code: def mock_load_backend_agent():
      def side_effect(*args, **kwargs):
          mock_props = mock.Mock()
          mock_props.args = args
          mock_props.kwargs = kwargs
          return mock_props
  
      with mock.patch(
          "wandb.sdk.launch.agent.agent.load_backend"
      ) as mock_load_backend:
          m = mock.Mock(side_effect=side_effect)
          m.run = mock.Mock(side_effect=side_effect)
          mock_load_backend.return_value = m
          yield mock_load_backend
  
imports: import json
  import multiprocessing.pool
  import os
  import sys
  from unittest import mock
  from unittest.mock import MagicMock
  import pytest
  import wandb
  import wandb.sdk.launch._launch
  import wandb.sdk.launch._project_spec
  import yaml
  from wandb.apis import PublicApi
  from wandb.sdk.launch.agent.agent import LaunchAgent
  from wandb.sdk.launch.builder.build import _inject_wandb_config_env_vars
  from wandb.sdk.launch.builder.docker_builder import DockerBuilder
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.utils import LAUNCH_DEFAULT_PROJECT, PROJECT_SYNCHRONOUS, pull_docker_image
  from wandb.sdk.lib import runid
  from tests.pytest_tests.unit_tests_old.utils import fixture_open, notebook_path
label_desc: Use image node_id 7 for calling a global function with example usage: mock_load_backend_agent() and returns: mock_props