comefrom: <doocs>2127.Maximum Employees to Be Invited to a Meeting_1.py
code: def max_cycle(fa):
      n = len(fa)
      vis = [False] * n
      ans = 0
      for i in range(n):
          if vis[i]:
              continue
          cycle = []
          j = i
          while not vis[j]:
              cycle.append(j)
              vis[j] = True
              j = fa[j]
          for k, v in enumerate(cycle):
              if v == j:
                  ans = max(ans, len(cycle) - k)
                  break
      return ans
masked: def sample_funcname ( var_0 ) :
      var_1 = len ( var_0 )
      var_2 = [ False ] * var_1
      var_3 = 0
      for var_4 in range ( var_1 ) :
          if var_2 [ var_4 ] :
              continue
          var_5 = [ ]
          var_6 = var_4
          while not var_2 [ var_6 ] :
              var_5.append ( var_6 )
              var_2 [ var_6 ] = True
              var_6 = var_0 [ var_6 ]
          for var_7 , var_8 in enumerate ( var_5 ) :
              if var_8 == var_6 :
                  var_3 = max ( var_3 , len ( var_5 ) - var_7 )
                  break
      return var_3
  