code: def doc_inject(relay_server, wandb_init):
      m = sys.modules.get("__main__")
      main_doc = getattr(m, "__doc__", None)
  
      def fn(new_doc=None, labels=None, init_kwargs=None):
          init_kwargs = init_kwargs or {}
          # clean up leading whitespace
          if new_doc is not None:
              m.__doc__ = inspect.cleandoc(new_doc)
          with relay_server() as relay:
              run = wandb_init(**init_kwargs)
              if labels:
                  run._label(**labels)
              run.finish()
          return relay.context, run.id
  
      yield fn
      if main_doc is not None:
          m.__doc__ = main_doc
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_label_full.py
imports: import inspect
  import sys
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: doc_inject(relay_server, wandb_init) and returns: relay,  run