def filter_from_alias(self, alias, backend=None):
def alias_filter(key_item):<EOL><INDENT>key, item = key_item<EOL>return ((alias is None or alias in key) and<EOL>(backend is None or item.backend == backend))<EOL><DEDENT>items = six.moves.filter(alias_filter, six.iteritems(self))<EOL>aliases = collections.OrderedDict(sorted(items, key=lambda a: a[<NUM_LIT:0>].lower()))<EOL>return aliases<EOL>
Return aliases that start with the given `alias`, optionally filtered
by backend.