code: def test_login_sets_api_base_url(local_settings):
      with mock.patch.dict(
          "os.environ", WANDB_API_KEY="ANONYMOOSE" * 4
      ):
          base_url = "https://api.test.host.ai"
          wandb.login(anonymous="must", host=base_url)
          api = wandb.Api()
          assert api.settings["base_url"] == base_url
          base_url = "https://api.wandb.ai"
          wandb.login(anonymous="must", host=base_url)
          api = wandb.Api()
          assert api.settings["base_url"] == base_url
  
imports: import os
  import platform
  import queue
  import sys
  import tempfile
  import threading
  import time
  from unittest import mock
  import pytest
  import wandb
label_desc: Use image node_id 10 for calling a global function with example usage: test_login_sets_api_base_url(local_settings) without return types