code: def filter(self, order_by=None, limit=0, **kwargs):
          
          with rconnect() as conn:
              if len(kwargs) == 0:
                  raise ValueError
  
              try:
                  query = self._base()
                  query = query.filter(kwargs)
  
                  if order_by is not None:
                      query = self._order_by(query, order_by)
  
                  if limit > 0:
                      query = self._limit(query, limit)
  
                  log.debug(query)
                  rv = query.run(conn)
  
              except ReqlOpFailedError as e:
                  log.warn(e)
                  raise
              except Exception as e:
                  log.warn(e)
                  raise
              else:
                  data = [self._model(_) for _ in rv]
                  return data
docs: Fetch a list of instances.
  
              :param order_by: column on which to order the results. \
              To change the sort, prepend with < or >.
              :param limit: How many rows to fetch.
              :param kwargs: keyword args on which to filter, column=value