code: def detect_version(self):
      if str(self.metadata.get("ss_base_model_version", "")).startswith(
          "sdxl_"
      ):
          return SdVersion.SDXL
      elif str(self.metadata.get("ss_v2", "")) == "True":
          return SdVersion.SD2
      elif len(self.metadata):
          return SdVersion.SD1
  
      return SdVersion.Unknown
  
imports: from __future__ import annotations
  import os
  from collections import namedtuple
  import enum
  from modules import sd_models, cache, errors, hashes, shared
label_desc: Use image node_id 2 for calling the NetworkOnDisk obj's underlying member method code with example usage: obj.detect_version() and returns: SdVersion, SdVersion, SdVersion, SdVersion