code: def _fetch(self, count=False):
          if self._result_cache is not None:
              return len(self._result_cache) if count else self._result_cache
          
          options = dict(self._options)  # make a local copy
          if self._where:
              # JSON encode WHERE values
              options['where'] = json.dumps(self._where)
          if self._select_related:
              options['include'] = ','.join(self._select_related)
          if count:
              return self._manager._count(**options)
  
          self._result_cache = self._manager._fetch(**options)
          return self._result_cache
docs: Return a list of objects matching query, or if count == True return
          only the number of objects matching.