code: def get_inf_server():
      if os.getenv("HOST") is not None:
          inf_server = os.environ["HOST"]
      elif os.getenv("GRADIO_SERVER_PORT") is not None:
          inf_server = (
              "http://localhost:%s" % os.environ["GRADIO_SERVER_PORT"]
          )
      else:
          raise ValueError(
              "Expect tests to set HOST or GRADIO_SERVER_PORT"
          )
      return inf_server
  
imports: import hashlib
  import os
  import sys
  import shutil
  from functools import wraps, partial
  import pytest
  from src.utils import call_subprocess_onetask, makedirs, FakeTokenizer, download_simple, sanitize_filename
label_desc: Use image node_id 2 for calling a global function with example usage: get_inf_server() and returns: inf_server