code: def to_mongo(self):
          
          d = copy.copy(self._fields)
          for k, v in self._slices.items():
              d[k] = {'$slice': v}
          return d
docs: Translate projection to MongoDB query form.
  
          :return: Dictionary to put into a MongoDB JSON query
          :rtype: dict