def get_view(endpoint):
    """Returns the view for the endpoint.  It will cache both positive and
    negative hits, so never pass untrusted values to it.  If a view does
    not exist, `None` is returned.
    """
    view = _resolved_views.get(endpoint)
    if view is not None:
        return view
    try:
        view = import_string('solace.views.' + endpoint)
    except (ImportError, __HOLE__):
        view = import_string(endpoint, silent=True)
    _resolved_views[endpoint] = view
    return view
dataset/ETHPy150Open mitsuhiko/solace/solace/application.py/get_view