code: def PreInitCallable(  # noqa: N802
      name: str, destination: Optional[Any] = None
  ) -> Callable:
      def preinit_wrapper(*args: Any, **kwargs: Any) -> Any:
          raise wandb.Error(
              f"You must call wandb.init() before {name}()"
          )
  
      preinit_wrapper.__name__ = str(name)
      if destination:
          preinit_wrapper.__wrapped__ = destination  # type: ignore
          preinit_wrapper.__doc__ = destination.__doc__
      return preinit_wrapper
  
file_path: wandb/wandb/sdk/lib/preinit.py
imports: from typing import Any, Callable, Optional
  import wandb
label_desc: Use image node_id 1 for calling a global function with example usage: PreInitCallable(name, destination) and returns: preinit_wrapper