'Obtain python function (importing a submodule if needed)
corresponding to filter_name.'

def build_filter_function(self, filter_name):

    if (':' in filter_name):
        (module_name, function_name) = filter_name.rsplit(':', 1)
        function = self._import_filter(module_name, function_name)
    else:
        function = getattr(globals(), filter_name.strip())
    return function
