code: def mock_require(mocker):
      cleanup = []
  
      def fn(require, func):
          cleanup.append(require)
          mocker.patch.object(
              wandb.wandb_sdk.wandb_require._Requires,
              "require_" + require,
              func,
              create=True,
          )
  
      yield fn
      for require in cleanup:
          wandb.__dict__.pop("require_" + require, None)
  
file_path: wandb/tests/pytest_tests/unit_tests/test_require_user.py
imports: import pytest
  import wandb
label_desc: Use image node_id 1 for calling a global function with example usage: mock_require(mocker) without return types