code: def save_model(cls):
      """Save a model and dump all the ops"""
  
      @functools.wraps(cls)
      def wrapper_save():
          _MODELS.append(cls)
          model = cls()
          scripted = torch.jit.script(model)
          buffer = BytesIO(
              scripted._save_to_buffer_for_lite_interpreter()
          )
          buffer.seek(0)
          mobile_module = _load_for_lite_interpreter(buffer)
          ops = _export_operator_list(mobile_module)
          _OPERATORS.update(ops)
          path = f"./{cls.__name__}.ptl"
          _FILENAMES.append(path)
          scripted._save_for_lite_interpreter(path)
  
      return wrapper_save
  
imports: import functools
  import os
  from io import BytesIO
  import shutil
  import sys
  import torch
  from torch.jit.mobile import _load_for_lite_interpreter, _export_operator_list
label_desc: Use image node_id 1 for calling a global function with example usage: save_model(cls) and returns: wrapper_save