code: def infotext_pasted(infotext, d):
      hashes = d.get("Lora hashes")
      if not hashes:
          return
  
      hashes = [x.strip().split(":", 1) for x in hashes.split(",")]
      hashes = {
          x[0].strip().replace(",", ""): x[1].strip() for x in hashes
      }
  
      def network_replacement(m):
          alias = m.group(1)
          shorthash = hashes.get(alias)
          if shorthash is None:
              return m.group(0)
  
          network_on_disk = networks.available_network_hash_lookup.get(
              shorthash
          )
          if network_on_disk is None:
              return m.group(0)
  
          return f"<lora:{network_on_disk.get_alias()}:"
  
      d["Prompt"] = re.sub(re_lora, network_replacement, d["Prompt"])
  
file_path: stable-diffusion-webui/extensions-builtin/Lora/scripts/lora_script.py
imports: import re
  import gradio
  from fastapi import FastAPI
  import network
  import networks
  import lora
  import lora_patches
  import extra_networks_lora
  import ui_extra_networks_lora
  from modules import script_callbacks, ui_extra_networks, extra_networks, shared
label_desc: Use image node_id 5 for calling a global function with example usage: infotext_pasted(infotext, d) and returns: str, network_on_disk, str, m, m