code: def test_sync_wandb_run_and_tensorboard(
      runner, relay_server, user, copy_asset
  ):
      with relay_server() as relay, runner.isolated_filesystem(), mock.patch(
          "wandb.sdk.artifacts.artifact_saver.ArtifactSaver.save",
          return_value=({}, None),
      ):
          run_dir = os.path.join(
              "wandb", "offline-run-20210216_154407-g9dvvkua"
          )
          copy_asset("wandb")
          tb_file_name = "events.out.tfevents.1585769947.cvp"
          copy_asset(tb_file_name, os.path.join(run_dir, tb_file_name))
  
          result = runner.invoke(cli.sync, ["--sync-all"])
          print(result.output)
          print(traceback.print_tb(result.exc_info[2]))
          assert result.exit_code == 0
  
          assert (
              f"{user}/code-toad/runs/g9dvvkua ... done."
              in result.output
          )
          assert len(relay.context.events) == 1
  
          uploaded_files = relay.context.get_run_uploaded_files(
              "g9dvvkua"
          )
          assert "code/standalone_tests/code-toad.py" in uploaded_files
  
          # Check we marked the run as synced
          result = runner.invoke(cli.sync, [run_dir])
          assert result.exit_code == 0
          assert (
              "WARNING Found .wandb file, not streaming tensorboard metrics"
              in result.output
          )
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_cli_full.py
imports: import netrc
  import os
  import traceback
  from unittest import mock
  import pytest
  import wandb
  from wandb.cli import cli
label_desc: Use image node_id 9 for calling a global function with example usage: test_sync_wandb_run_and_tensorboard(runner, relay_server, user, copy_asset) without return types