code: def ids(cls, filter=None, **kwargs):
          
          from mongoframes.queries import Condition, Group, to_refs
  
          # Find the documents
          if isinstance(filter, (Condition, Group)):
              filter = filter.to_dict()
  
          documents = cls.get_collection().find(
              to_refs(filter),
              projection={'_id': True},
              **kwargs
              )
  
          return [d['_id'] for d in list(documents)]
docs: Return a list of Ids for documents matching the filter