'Return data to build a url to the visualization with the given
`visualization_name` if it\'s applicable to `target_object` or
`None` if it\'s not.'

def get_visualization(self, trans, visualization_name, target_object):

    visualization = self.plugins.get(visualization_name, None)
    if (not visualization):
        return None
    data_sources = visualization.config['data_sources']
    for data_source in data_sources:
        model_class = data_source['model_class']
        if (not isinstance(target_object, model_class)):
            continue
        tests = data_source['tests']
        if (tests and (not self.is_object_applicable(trans, target_object, tests))):
            continue
        param_data = data_source['to_params']
        url = self.get_visualization_url(trans, target_object, visualization, param_data)
        display_name = visualization.config.get('name', None)
        render_target = visualization.config.get('render_target', 'galaxy_main')
        embeddable = visualization.config.get('embeddable', False)
        return {'href': url, 'html': display_name, 'target': render_target, 'embeddable': embeddable}
    return None
