code: def filter_oplog_entry(self, entry, include_fields=None, exclude_fields=None):
          
          if not include_fields and not exclude_fields:
              return entry
          elif include_fields:
              filter_fields = self._copy_included_fields
          else:
              filter_fields = self._pop_excluded_fields
  
          fields = include_fields or exclude_fields
          entry_o = entry["o"]
          # Version 3.6 of mongodb includes a $v,
          # see https://jira.mongodb.org/browse/SERVER-32240
          if "$v" in entry_o:
              entry_o.pop("$v")
  
          # 'i' indicates an insert. 'o' field is the doc to be inserted.
          if entry["op"] == "i":
              entry["o"] = filter_fields(entry_o, fields)
          # 'u' indicates an update. The 'o' field describes an update spec
          # if '$set' or '$unset' are present.
          elif entry["op"] == "u" and ("$set" in entry_o or "$unset" in entry_o):
              if "$set" in entry_o:
                  entry["o"]["$set"] = filter_fields(entry_o["$set"], fields, update=True)
              if "$unset" in entry_o:
                  entry["o"]["$unset"] = filter_fields(
                      entry_o["$unset"], fields, update=True
                  )
              # not allowed to have empty $set/$unset, so remove if empty
              if "$set" in entry_o and not entry_o["$set"]:
                  entry_o.pop("$set")
              if "$unset" in entry_o and not entry_o["$unset"]:
                  entry_o.pop("$unset")
              if not entry_o:
                  return None
          # 'u' indicates an update. The 'o' field is the replacement document
          # if no '$set' or '$unset' are present.
          elif entry["op"] == "u":
              entry["o"] = filter_fields(entry_o, fields)
  
          return entry
docs: Remove fields from an oplog entry that should not be replicated.
  
          NOTE: this does not support array indexing, for example 'a.b.2