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