code: def discretize(value, factor=100):
      
      if not isinstance(value, Iterable):
          return int(value * factor)
      int_value = list(deepcopy(value))
      for i in range(len(int_value)):
          int_value[i] = int(int_value[i] * factor)
      return int_value
docs: Discretize the given value, pre-multiplying by the given factor