code: def to_json(
      self, run_or_artifact: Union["LocalRun", "Artifact"]
  ) -> dict:
      json_obj = super().to_json(run_or_artifact)
      assert isinstance(run_or_artifact, wandb.Artifact)
      if self._dep_py_files_path is not None:
          json_obj[
              "dep_py_files_path"
          ] = _add_deterministic_dir_to_artifact(
              run_or_artifact,
              self._dep_py_files_path,
              os.path.join(".wb_data", "extra_files"),
          )
      return json_obj
  
imports: import os
  import shutil
  import sys
  from typing import TYPE_CHECKING, Any, ClassVar, Generic, List, Optional, Type, TypeVar, Union, cast
  import wandb
  from wandb import util
  from wandb.sdk.lib import runid
  from wandb.sdk.lib.hashutil import md5_file_hex
  from wandb.sdk.lib.paths import LogicalPath
  from ._private import MEDIA_TMP
  from .base_types.wb_value import WBValue
label_desc: Use image node_id 3 for calling the _PicklingSavedModel obj's underlying member method code with example usage: obj.to_json(run_or_artifact) and returns: json_obj