def _clean_record(self, record):
        """Remove all fields with `None` values"""
        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
Remove all fields with `None` values