code: def from_config(config):
          
          result = Parameters()
          
          if config == None or len(config) == 0:
              return result
          
          for (key, value) in config.items():
              result.put(key, value)
          
          return result
docs: Creates new Parameters from ConfigMap object.
  
          :param config: a ConfigParams that contain parameters.
  
          :return: a new Parameters object.