code: def _clean_record(self, record):
          
          for k, v in dict(record).items():
              if isinstance(v, dict):
                  v = self._clean_record(v)
              if v is None:
                  record.pop(k)
          return record
docs: Remove all fields with `None` values