'Parse the template, name, and any data_sources and params from the
given `xml_tree` for a visualization.'

def parse_visualization(self, xml_tree):

    returned = {}
    returned['plugin_type'] = xml_tree.tag
    returned['name'] = xml_tree.attrib.get('name', None)
    if (not returned['name']):
        raise ParsingException('visualization    needs    a    name    attribute')
    if ('disabled' in xml_tree.attrib):
        log.info('Visualizations    plugin    disabled:    %s.    Skipping...', returned['name'])
        return None
    returned['embeddable'] = False
    if ('embeddable' in xml_tree.attrib):
        returned['embeddable'] = (xml_tree.attrib.get('embeddable', False) == 'true')
    description = xml_tree.find('description')
    returned['description'] = (description.text.strip() if (description is not None) else None)
    data_sources = []
    data_sources_confs = xml_tree.find('data_sources')
    for data_source_conf in data_sources_confs.findall('data_source'):
        data_source = self.data_source_parser.parse(data_source_conf)
        if data_source:
            data_sources.append(data_source)
    if (not data_sources):
        raise ParsingException('No    valid    data_sources    for    visualization')
    returned['data_sources'] = data_sources
    params = {}
    param_confs = xml_tree.find('params')
    param_elements = (param_confs.findall('param') if (param_confs is not None) else [])
    for param_conf in param_elements:
        param = self.param_parser.parse(param_conf)
        if param:
            params[param_conf.text] = param
    if params:
        returned['params'] = params
    param_modifiers = {}
    param_modifier_elements = (param_confs.findall('param_modifier') if (param_confs is not None) else [])
    for param_modifier_conf in param_modifier_elements:
        param_modifier = self.param_modifier_parser.parse(param_modifier_conf)
        target_param = param_modifier_conf.get('modifies')
        param_modifier_key = param_modifier_conf.text
        if (param_modifier and (target_param in params)):
            if (target_param not in param_modifiers):
                param_modifiers[target_param] = {}
            param_modifiers[target_param][param_modifier_key] = param_modifier
    if param_modifiers:
        returned['param_modifiers'] = param_modifiers
    returned['entry_point'] = self.parse_entry_point(xml_tree)
    link_text = xml_tree.find('link_text')
    if ((link_text is not None) and link_text.text):
        returned['link_text'] = link_text
    render_target = xml_tree.find('render_target')
    if (((render_target is not None) and render_target.text) and (render_target.text in self.VALID_RENDER_TARGETS)):
        returned['render_target'] = render_target.text
    else:
        returned['render_target'] = 'galaxy_main'
    return returned
