'Returns the filter name for a filter function or `None` if there
is no such filter.'

def get_filter_name(self, filter):

    if (filter not in _resolved_filters):
        for library in libraries.values():
            for (key, value) in library.filters.iteritems():
                _resolved_filters[value] = key
    return _resolved_filters.get(filter, None)
