'Query this document for objects that match the given selector.
Args:
selector (JSON-like query dictionary) : you can query by type or by
name, e.g. ``{"type": HoverTool}``, ``{"name": "mycircle"}``
Returns:
seq[Model]'

def select(self, selector):

    if self._is_single_string_selector(selector, 'name'):
        return self._all_models_by_name.get_all(selector['name'])
    else:
        return find(self._all_models.values(), selector)
