code: def test_delete_model_version_flow(client):
      name = "DeleteMVTest"
      start_time_0 = get_current_time_millis()
      client.create_registered_model(name)
      end_time_0 = get_current_time_millis()
      rmd1 = client.get_registered_model(name)
      assert_is_between(
          start_time_0, end_time_0, rmd1.creation_timestamp
      )
      assert_is_between(
          start_time_0, end_time_0, rmd1.last_updated_timestamp
      )
  
      start_time_1 = get_current_time_millis()
      mv1 = client.create_model_version(
          name, "runs:/run_id/model", "run_id_1"
      )
      end_time_1 = get_current_time_millis()
      assert mv1.version == "1"
      assert mv1.name == name
      mvd1 = client.get_model_version(name, 1)
      assert_is_between(
          start_time_1, end_time_1, mvd1.creation_timestamp
      )
      assert_is_between(
          start_time_1, end_time_1, mvd1.last_updated_timestamp
      )
  
      # creating model version changes last_updated_timestamp for registered model
      rmd2 = client.get_registered_model(name)
      assert_is_between(
          start_time_0, end_time_0, rmd2.creation_timestamp
      )
      assert_is_between(
          start_time_1, end_time_1, rmd2.last_updated_timestamp
      )
  
      mv2 = client.create_model_version(
          name, "runs:/run_id/another_model", "run_id_1"
      )
      assert mv2.version == "2"
      assert mv2.name == name
      mv3 = client.create_model_version(
          name, "runs:/run_id_2/a/b/c", "run_id_2"
      )
      assert mv3.version == "3"
      assert mv3.name == name
      model_versions_detailed = [
          rm.latest_versions
          for rm in client.search_registered_models()
          if rm.name == name
      ]
      assert len(model_versions_detailed) == 1
      assert model_versions_detailed[0][0].version == "3"
      assert {
          mv.version
          for mv in client.search_model_versions(f"name = '{name}'")
      } == {
          "1",
          "2",
          "3",
      }
  
      start_time_2 = get_current_time_millis()
      client.delete_model_version(name, "1")
      end_time_2 = get_current_time_millis()
      assert {
          mv.version
          for mv in client.search_model_versions(f"name = '{name}'")
      } == {
          "2",
          "3",
      }
      rmd3 = client.get_registered_model(name)
      # deleting model versions changes last_updated_timestamp for registered model
      assert_is_between(
          start_time_0, end_time_0, rmd3.creation_timestamp
      )
      assert_is_between(
          start_time_2, end_time_2, rmd3.last_updated_timestamp
      )
  
      # cannot get a deleted model version
      with pytest.raises(
          MlflowException, match=r"Model Version .+ not found"
      ):
          client.delete_model_version(name, "1")
  
      # cannot update a deleted model version
      with pytest.raises(
          MlflowException, match=r"Model Version .+ not found"
      ):
          client.update_model_version(
              name=name, version=1, description="Test model"
          )
      with pytest.raises(
          MlflowException, match=r"Model Version .+ not found"
      ):
          client.transition_model_version_stage(
              name=name, version=1, stage="Staging"
          )
  
      client.delete_model_version(name, 3)
      assert {
          mv.version
          for mv in client.search_model_versions(f"name = '{name}'")
      } == {"2"}
  
      # new model versions will not reuse existing version numbers
      mv4 = client.create_model_version(
          name, "runs:/run_id_2/a/b/c", "run_id_2"
      )
      assert mv4.version == "4"
      assert mv4.name == name
      assert {
          mv.version
          for mv in client.search_model_versions(f"name = '{name}'")
      } == {
          "2",
          "4",
      }
  
imports: import time
  import pytest
  from mlflow import MlflowClient
  from mlflow.entities.model_registry import ModelVersion, RegisteredModel
  from mlflow.exceptions import MlflowException
  from mlflow.utils.os import is_windows
  from mlflow.utils.time import get_current_time_millis
  from tests.tracking.integration_test_utils import _init_server
label_desc: Use image node_id 17 for calling a global function with example usage: test_delete_model_version_flow(client) without return types