code: def _get_flavor_configuration_from_ml_model_file(
      ml_model_file, flavor_name
  ):
      model_conf = Model.load(ml_model_file)
      if flavor_name not in model_conf.flavors:
          raise MlflowException(
              f'Model does not have the "{flavor_name}" flavor',
              RESOURCE_DOES_NOT_EXIST,
          )
      return model_conf.flavors[flavor_name]
  
imports: import json
  import os
  import sys
  from typing import Any, Dict
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, RESOURCE_DOES_NOT_EXIST
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.models_artifact_repo import ModelsArtifactRepository
  from mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.file_utils import _copy_file_or_tree
  from mlflow.utils.uri import append_to_uri_path
label_desc: Use image node_id 3 for calling a global function with example usage: _get_flavor_configuration_from_ml_model_file(ml_model_file, flavor_name) and returns: model_conf