def METHOD_NAME(self, query: List[str]) -> List[Instance]:
    """Query instances by query string"""
    instances = []
    for instance in self.get_instances():
        if instance.match(query):
            instances.append(instance)
    return instances