class_docstr: Inner class of _WandbSetup.
class_docstr_tok: ["Inner","class","of","_WandbSetup","."]
code: def _settings_setup(
      self,
      settings: Optional[Settings] = None,
      early_logger: Optional[_EarlyLogger] = None,
  ) -> "wandb_settings.Settings":
      s = wandb_settings.Settings()
      s._apply_base(pid=self._pid, _logger=early_logger)
      s._apply_config_files(_logger=early_logger)
      s._apply_env_vars(self._environ, _logger=early_logger)
  
      if isinstance(settings, wandb_settings.Settings):
          s._apply_settings(settings, _logger=early_logger)
      elif isinstance(settings, dict):
          # if passed settings arg is a mapping, update the settings with it
          s._apply_setup(settings, _logger=early_logger)
  
      s._infer_settings_from_environment()
      if not s._cli_only_mode:
          s._infer_run_settings_from_environment(_logger=early_logger)
  
      return s
  
imports: import logging
  import os
  import sys
  import threading
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  import wandb
  from .None import wandb_manager, wandb_settings
  from .lib import config_util, server, tracelog
label_desc: Use image node_id 2 for calling the _WandbSetup__WandbSetup obj's underlying member method code with example usage: obj._settings_setup(settings, early_logger) and returns: s