code: def test_resumed_run_resume_file_state(
      mock_run, tmp_path, settings, expected
  ):
      tmp_file = tmp_path / "test_resume.json"
      tmp_file.write_text("{'run_id': 'test'}")
  
      run = mock_run(
          use_magic_mock=True,
          settings={"resume_fname": str(tmp_file), **settings},
      )
      run._on_ready()
  
      assert tmp_file.exists() == expected
  
imports: import copy
  import os
  import platform
  import unittest.mock
  import numpy
  import pytest
  import wandb
  import wandb.errors
  from wandb import wandb_sdk
label_desc: Use image node_id 19 for calling a global function with example usage: test_resumed_run_resume_file_state(mock_run, tmp_path, settings, expected) without return types