comefrom: <doocs>0335.Self Crossing_1.py
code: def isSelfCrossing( distance: List[int]) -> bool:
      d = distance
      for i in range(3, len(d)):
          if d[i] >= d[i - 2] and d[i - 1] <= d[i - 3]:
              return True
          if i >= 4 and d[i - 1] == d[i - 3] and d[i] + d[i - 4] >= d[i - 2]:
              return True
          if (
              i >= 5
              and d[i - 2] >= d[i - 4]
              and d[i - 1] <= d[i - 3]
              and d[i] >= d[i - 2] - d[i - 4]
              and d[i - 1] + d[i - 5] >= d[i - 3]
          ):
              return True
      return False
masked: def sample_funcname ( var_0 : List [ int ] ) -> bool :
      var_4 = var_0
      for var_8 in range ( 3 , len ( var_4 ) ) :
          if var_4 [ var_8 ] >= var_4 [ var_8 - 2 ] and var_4 [ var_8 - 1 ] <= var_4 [ var_8 - 3 ] :
              return True
          if var_8 >= 4 and var_4 [ var_8 - 1 ] == var_4 [ var_8 - 3 ] and var_4 [ var_8 ] + var_4 [ var_8 - 4 ] >= var_4 [ var_8 - 2 ] :
              return True
          if ( var_8 >= 5 and var_4 [ var_8 - 2 ] >= var_4 [ var_8 - 4 ] and var_4 [ var_8 - 1 ] <= var_4 [ var_8 - 3 ] and var_4 [ var_8 ] >= var_4 [ var_8 - 2 ] - var_4 [ var_8 - 4 ] and var_4 [ var_8 - 1 ] + var_4 [ var_8 - 5 ] >= var_4 [ var_8 - 3 ] ) :
              return True
      return False
  