docstr: Handle wandb run initialization.
docstr_tok: ["Handle","wandb","run","initialization","."]
code: def _run_init(self, init: AutologInitArgs = None) -> None:
      """Handle wandb run initialization."""
      # - autolog(init: dict = {...}) calls wandb.init(**{...})
      #   regardless of whether there is a wandb.run or not,
      #   we only track if the run was created by autolog
      #    - todo: autolog(init: dict | run = run) would use the user-provided run
      # - autolog() uses the wandb.run if there is one, otherwise it calls wandb.init()
      if init:
          _wandb_run = wandb.run
          # we delegate dealing with the init dict to wandb.init()
          self._run = wandb.init(**init)
          if _wandb_run != self._run:
              self.__run_created_by_autolog = True
      elif wandb.run is None:
          self._run = wandb.init()
          self.__run_created_by_autolog = True
      else:
          self._run = wandb.run
  
imports: import asyncio
  import functools
  import inspect
  import logging
  import sys
  from typing import Any, Dict, Optional, Sequence, TypeVar
  import wandb.sdk
  import wandb.util
  from wandb.sdk.lib import telemetry
  from wandb.sdk.lib.timer import Timer
label_desc: Use image node_id 4 for calling the AutologAPI obj's underlying member method code with example usage: obj._run_init(init) without return types