code: def list_available_networks():
      available_networks.clear()
      available_network_aliases.clear()
      forbidden_network_aliases.clear()
      available_network_hash_lookup.clear()
      forbidden_network_aliases.update({"none": 1, "Addams": 1})
  
      os.makedirs(shared.cmd_opts.lora_dir, exist_ok=True)
  
      candidates = list(
          shared.walk_files(
              shared.cmd_opts.lora_dir,
              allowed_extensions=[".pt", ".ckpt", ".safetensors"],
          )
      )
      candidates += list(
          shared.walk_files(
              shared.cmd_opts.lyco_dir_backcompat,
              allowed_extensions=[".pt", ".ckpt", ".safetensors"],
          )
      )
      for filename in candidates:
          if os.path.isdir(filename):
              continue
  
          name = os.path.splitext(os.path.basename(filename))[0]
          try:
              entry = network.NetworkOnDisk(name, filename)
          except (
              OSError
          ):  # should catch FileNotFoundError and PermissionError etc.
              errors.report(
                  f"Failed to load network {name} from {filename}",
                  exc_info=True,
              )
              continue
  
          available_networks[name] = entry
  
          if entry.alias in available_network_aliases:
              forbidden_network_aliases[entry.alias.lower()] = 1
  
          available_network_aliases[name] = entry
          available_network_aliases[entry.alias] = entry
  
imports: import logging
  import os
  import re
  import lora_patches
  import network
  import network_lora
  import network_glora
  import network_hada
  import network_ia3
  import network_lokr
  import network_full
  import network_norm
  import network_oft
  import torch
  from typing import Union
  from modules import shared, devices, sd_models, errors, scripts, sd_hijack
  import modules.textual_inversion.textual_inversion
  from lora_logger import logger
label_desc: Use image node_id 20 for calling a global function with example usage: list_available_networks() without return types