code: def test_add_run_to_existing_sweep(user, wandb_init, relay_server):
      # Test that updating settings with sweep_id includes it in upsertBucket mutation
  
      with relay_server() as relay:
          sweep_id = wandb.sweep(SWEEP_CONFIG_GRID, entity=user)
          settings = wandb.Settings()
          settings.update({"sweep_id": sweep_id})
          run = wandb_init(entity=user, settings=settings)
          run.log({"x": 1})
          run.finish()
  
      run_attrs = relay.context.get_run_attrs(run.id)
      assert sweep_id == run_attrs.sweep_name
  
file_path: wandb/tests/pytest_tests/system_tests/test_sweep/test_wandb_sweep.py
imports: from typing import Any, Dict, List
  import pytest
  import wandb
label_desc: Use image node_id 5 for calling a global function with example usage: test_add_run_to_existing_sweep(user, wandb_init, relay_server) without return types