code: def get_inf_port():
      if os.getenv("HOST") is not None:
          inf_port = os.environ["HOST"].split(":")[-1]
      elif os.getenv("GRADIO_SERVER_PORT") is not None:
          inf_port = os.environ["GRADIO_SERVER_PORT"]
      else:
          inf_port = str(7860)
      return int(inf_port)
  
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 1 for calling a global function with example usage: get_inf_port() and returns: int