'Given a list of `to_param` elements, returns a dictionary that allows
the registry to convert the data_source into one or more appropriate
params for the visualization.'

def parse_to_params(self, xml_tree_list):

    to_param_dict = {}
    if (not xml_tree_list):
        return to_param_dict
    for element in xml_tree_list:
        param_name = element.text
        if (not param_name):
            raise ParsingException('to_param    requires    text    (the    param    name)')
        param = {}
        assign = element.get('assign')
        if (assign is not None):
            param['assign'] = assign
        param_attr = element.get('param_attr')
        if (param_attr is not None):
            param['param_attr'] = param_attr
        if ((not param_attr) and (not assign)):
            raise ParsingException('to_param    requires    either    assign    or    param_attr    attributes:    %s', param_name)
        if param:
            to_param_dict[param_name] = param
    return to_param_dict
