comefrom: <qiyuangong>954_Array_of_Doubled_Pairs_1.py
code: def canReorderDoubled( A):
      v_map = {}
      A.sort(key=lambda x: abs(x))
      for n in A:
          v_map[n] = v_map.get(n, 0) + 1
      for n in A:
          if v_map[n] <= 0:
              continue
          if 2 * n in v_map and v_map[2 * n] > 0:
              v_map[n] -= 1
              v_map[2 * n] -= 1
          else:
              return False
      return True
masked: def sample_funcname ( var_0 ) :
      var_1 = { }
      var_0.sort ( var_3 = lambda var_4 : abs ( var_4 ) )
      for var_6 in var_0 :
          var_1 [ var_6 ] = var_1.get ( var_6 , 0 ) + 1
      for var_6 in var_0 :
          if var_1 [ var_6 ] <= 0 :
              continue
          if 2 * var_6 in var_1 and var_1 [ 2 * var_6 ] > 0 :
              var_1 [ var_6 ] -= 1
              var_1 [ 2 * var_6 ] -= 1
          else :
              return False
      return True
  