code: def resolve_vae_from_user_metadata(checkpoint_file) -> VaeResolution:
      metadata = extra_networks.get_user_metadata(checkpoint_file)
      vae_metadata = metadata.get("vae", None)
      if vae_metadata is not None and vae_metadata != "Automatic":
          if vae_metadata == "None":
              return VaeResolution()
  
          vae_from_metadata = vae_dict.get(vae_metadata, None)
          if vae_from_metadata is not None:
              return VaeResolution(
                  vae_from_metadata, "from user metadata"
              )
  
      return VaeResolution(resolved=False)
  
imports: import os
  import collections
  from dataclasses import dataclass
  from modules import paths, shared, devices, script_callbacks, sd_models, extra_networks, lowvram, sd_hijack, hashes
  import glob
  from copy import deepcopy
label_desc: Use image node_id 12 for calling a global function with example usage: resolve_vae_from_user_metadata(checkpoint_file) and returns: VaeResolution, VaeResolution, VaeResolution