code: def to_pymongo(self) -> dict:
      d = self.__dict__
      d["context"] = (
          d["context"].to_dict()
          if isinstance(d["context"], ExecutionContext)
          else d["context"]
      )
      d.pop("_doc")
      d.pop("id")
      return d
  
file_path: fiftyone/fiftyone/factory/repos/delegated_operation_doc.py
imports: import logging
  from datetime import datetime
  from fiftyone.operators.executor import ExecutionContext, ExecutionResult, ExecutionRunState, ExecutionProgress
label_desc: Use image node_id 3 for calling the DelegatedOperationDocument obj's underlying member method code with example usage: obj.to_pymongo() and returns: d