comefrom: <doocs>0219.Contains Duplicate II_1.py
code: def containsNearbyDuplicate( nums: List[int], k: int) -> bool:
      mp = {}
      for i, v in enumerate(nums):
          if v in mp and i - mp[v] <= k:
              return True
          mp[v] = i
      return False
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : int ) -> bool :
      var_2 = { }
      for var_3 , var_4 in enumerate ( var_0 ) :
          if var_4 in var_2 and var_3 - var_2 [ var_4 ] <= var_1 :
              return True
          var_2 [ var_4 ] = var_3
      return False
  