code: def delete_model_version(self, models):
      if len(models) == 0:
          raise Exception("Version to delete is not found")
  
      for model in models:
          model_record = get_model_record(
              name=model["NAME"],
              project_name=model["PROJECT"],
              version=model["VERSION"],
              active=None,
          )
          if model_record.active:
              raise Exception(
                  f"Can't remove active version: {model['PROJECT']}.{model['NAME']}.{model['VERSION']}"
              )
  
          is_cloud = self.config.get("cloud", False)
          if is_cloud:
              model_record.deleted_at = dt.datetime.now()
          else:
              db.session.delete(model_record)
          modelStorage = ModelStorage(model_record.id)
          modelStorage.delete()
  
      db.session.commit()
  
imports: import sys
  import copy
  import datetime
  from copy import deepcopy
  from multiprocessing.pool import ThreadPool
  import pandas
  from dateutil.parser import parse
  from sqlalchemy import func, null
  import numpy
  import mindsdb.interfaces.storage.db
  from mindsdb.utilities.config import Config
  from mindsdb.interfaces.model.functions import get_model_record, get_model_records
  from mindsdb.interfaces.storage.json import get_json_storage
  from mindsdb.interfaces.storage.model_fs import ModelStorage
  from mindsdb.utilities.context import context
  from mindsdb.utilities.functions import resolve_model_identifier
  import mindsdb.utilities.profiler
  from mindsdb.utilities.exception import EntityExistsError, EntityNotExistsError
  from mindsdb.utilities import log
label_desc: Use image node_id 18 for calling the ModelController obj's underlying member method code with example usage: obj.delete_model_version(models) without return types