code: def friendly_name(file: str):
      if file.startswith("http"):
          file = urlparse(file).path
  
      file = os.path.basename(file)
      model_name, extension = os.path.splitext(file)
      return model_name
  
file_path: stable-diffusion-webui/modules/modelloader.py
imports: from __future__ import annotations
  import os
  import shutil
  import importlib
  from urllib.parse import urlparse
  from modules import shared
  from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, UpscalerNone
  from modules.paths import script_path, models_path
label_desc: Use image node_id 3 for calling a global function with example usage: friendly_name(file) and returns: model_name