'This implements searches like \'if query in cmd\'. It\'s a fuzzy
matching used by the help system, returning True if query can
be found as a substring of the commands key or its aliases.
Args:
query (str): query to match against. Should be lower case.
Returns:
result (bool): Fuzzy matching result.'

def __contains__(self, query):

    return any(((query in keyalias) for keyalias in self._keyaliases))
