Retrieves the interpretation function used.

def _get_interpretation_function(interpretation, dtype):
    """
    Retrieves the interpretation function used.
    """

    type_string = dtype.__name__
    name = "%s__%s" % (interpretation, type_string)

    global _interpretations

    if not hasattr(_interpretations, name):
        raise ValueError("No transform available for type '%s' with interpretation '%s'."
                         % (type_string, interpretation))

    return getattr(_interpretations, name)