code: def patched_run_run_entry(cmd, dir):
      print(f"running command: {cmd}")
      mock_run = Mock()
      rv = Mock()
      rv.state = "finished"
  
      async def _mock_get_status():
          return rv
  
      mock_run.get_status = _mock_get_status
      return mock_run
  
imports: import json
  import os
  from unittest.mock import Mock
  import pytest
  import wandb
  from wandb.apis import public
  from wandb.cli import cli
  from .test_launch import mock_load_backend, mocked_fetchable_git_repo
label_desc: Use image node_id 2 for calling a global function with example usage: patched_run_run_entry(cmd, dir) and returns: mock_run, rv