code: def send_run_with_send_manager(
      run: ImporterRun,
      overrides: Optional[Dict[str, Any]] = None,
      settings_override: Optional[SettingsStatic] = None,
  ) -> None:
      # does this need to be here for pmap?
      if overrides:
          for k, v in overrides.items():
              # `lambda: v` won't work!
              # https://stackoverflow.com/questions/10802002/why-deepcopy-doesnt-create-new-references-to-lambda-function
              setattr(run, k, lambda v=v: v)
      _settings_override = coalesce(settings_override, {})
      rm = RecordMaker(run)
  
      root_dir = rm.run_dir
      default_settings = {
          "files_dir": os.path.join(root_dir, "files"),
          "root_dir": root_dir,
          "_start_time": 0,
          "git_remote": None,
          "resume": False,
          "program": None,
          "ignore_globs": (),
          "run_id": None,
          "entity": None,
          "project": None,
          "run_group": None,
          "job_type": None,
          "run_tags": None,
          "run_name": None,
          "run_notes": None,
          "save_code": None,
          "email": None,
          "silent": None,
          "_offline": None,
          "_sync": True,
          "_live_policy_rate_limit": None,
          "_live_policy_wait_time": None,
          "disable_job_creation": False,
          "_async_upload_concurrency_limit": None,
      }
      combined_settings = {**default_settings, **_settings_override}
      settings_message = wandb_settings_pb2.Settings()
      ParseDict(combined_settings, settings_message)
  
      settings = SettingsStatic(settings_message)
  
      record_q: queue.Queue = queue.Queue()
      result_q: queue.Queue = queue.Queue()
      interface = InterfaceQueue(record_q=record_q)
      context_keeper = context.ContextKeeper()
  
      with SendManager(
          settings, record_q, result_q, interface, context_keeper
      ) as sm:
          wandb.termlog(">> Make run record")
          sm.send(rm._make_run_record())
  
          wandb.termlog(">> Use Artifacts")
          used_artifacts = run.used_artifacts()
          if used_artifacts is not None:
              for artifact in tqdm(
                  used_artifacts,
                  desc="Used artifacts",
                  unit="artifacts",
                  leave=False,
              ):
                  sm.send(
                      rm._make_artifact_record(
                          artifact, use_artifact=True
                      )
                  )
  
          wandb.termlog(">> Log Artifacts")
          artifacts = run.artifacts()
          if artifacts is not None:
              for artifact in tqdm(
                  artifacts,
                  desc="Logged artifacts",
                  unit="artifacts",
                  leave=False,
              ):
                  sm.send(rm._make_artifact_record(artifact))
  
          wandb.termlog(">> Log Metadata")
          sm.send(rm._make_metadata_files_record())
  
          wandb.termlog(">> Log History")
          for history_record in tqdm(
              rm._make_history_records(),
              desc="History",
              unit="steps",
              leave=False,
          ):
              sm.send(history_record)
  
          wandb.termlog(">> Log Summary")
          sm.send(rm._make_summary_record())
  
          wandb.termlog(">> Log Output")
          # if hasattr(run, "_logs"):
          #     lines = run._logs
          lines = run.logs()
          if lines is not None:
              for line in tqdm(
                  lines, desc="Stdout", unit="lines", leave=False
              ):
                  sm.send(rm._make_output_record(line))
  
          wandb.termlog(">> Log Telem")
          sm.send(rm._make_telem_record())
  
imports: import json
  import os
  import queue
  import sys
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Optional, Tuple
  from unittest.mock import patch
  from google.protobuf.json_format import ParseDict
  from tqdm import tqdm
  import wandb
  from wandb.proto import wandb_internal_pb2
  from wandb.proto import wandb_settings_pb2
  from wandb.proto import wandb_telemetry_pb2
  from wandb.sdk.interface.interface import file_policy_to_enum
  from wandb.sdk.interface.interface_queue import InterfaceQueue
  from wandb.sdk.internal import context
  from wandb.sdk.internal.sender import SendManager
  from wandb.sdk.internal.settings_static import SettingsStatic
  from wandb.util import cast_dictlike_to_dict, coalesce
label_desc: Use image node_id 1 for calling a global function with example usage: send_run_with_send_manager(run, overrides, settings_override) without return types