code: def _load_model_version(self, loaded_model):
      buffer = io.BytesIO()
      torch.jit.save(loaded_model, buffer)
      buffer.seek(0)
      zipped_model = zipfile.ZipFile(buffer)
      # there was a change in how we store version number
      # in a package between version 3 and 7.
      # So we have to check for both.
      try:
          version = int(
              zipped_model.read("archive/version").decode("utf-8")
          )
          return version
      except KeyError:
          version = int(
              zipped_model.read("archive/.data/version").decode("utf-8")
          )
          return version
  
imports: import io
  import os
  import sys
  import torch
  import zipfile
  from torch.testing import FileCheck
  from typing import Union
  from torch.testing._internal.jit_utils import JitTestCase
label_desc: Use image node_id 1 for calling the TestUpgraders obj's underlying member method code with example usage: obj._load_model_version(loaded_model) and returns: version, version