comefrom: <doocs>2365.Task Scheduler II_1.py
code: def taskSchedulerII( tasks: List[int], space: int) -> int:
      mp = {}
      ans = 0
      for v in tasks:
          ans += 1
          ans = max(ans, mp.get(v, 0))
          mp[v] = ans + space + 1
      return ans
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : int ) -> int :
      var_2 = { }
      var_3 = 0
      for var_4 in var_0 :
          var_3 += 1
          var_3 = max ( var_3 , var_2.get ( var_4 , 0 ) )
          var_2 [ var_4 ] = var_3 + var_1 + 1
      return var_3
  