code: def test_save_live_existing_file(
      relay_server, user, mock_run, backend_interface
  ):
      run = mock_run(use_magic_mock=True)
      file_name = "wandb.rules"
  
      with relay_server() as relay, backend_interface(run) as interface:
          with open(os.path.join(run.dir, file_name), "w") as f:
              f.write("BOOM BOOM")
          interface.publish_files({"files": [(file_name, "live")]})
  
      uploaded_files = relay.context.get_run_uploaded_files(run.id)
  
      assert file_name in uploaded_files
      assert uploaded_files.count(file_name) == 1
  
imports: import json
  import os
  import shutil
  import threading
  import time
  import unittest.mock
  import pytest
  import wandb
  from wandb.errors import CommError
  from wandb.proto import wandb_internal_pb2
  from wandb.sdk.interface.interface import InterfaceBase
  from wandb.sdk.lib import filesystem
label_desc: Use image node_id 1 for calling a global function with example usage: test_save_live_existing_file(relay_server, user, mock_run, backend_interface) without return types