Creates new Parameters from ConfigMap object.

        :param config: a ConfigParams that contain parameters.

        :return: a new Parameters object.

def from_config(config):
        """
        Creates new Parameters from ConfigMap object.

        :param config: a ConfigParams that contain parameters.

        :return: a new Parameters object.
        """
        result = Parameters()
        
        if config == None or len(config) == 0:
            return result
        
        for (key, value) in config.items():
            result.put(key, value)
        
        return result