'Creates a context for a filter that can subsequently be added
to a pipeline context.
:param entry_point_name: entry point of the middleware (Swift only)
:returns: a filter context'

def create_filter(self, entry_point_name):

    spec = ('egg:swift#' + entry_point_name)
    ctx = loadwsgi.loadcontext(loadwsgi.FILTER, spec, global_conf=self.context.global_conf)
    ctx.protocol = 'paste.filter_factory'
    ctx.name = entry_point_name
    return ctx
