code: def test_infer_artifact_type_and_ext_raise_exception_for_unsupported_ext(
      tmp_path, cm_fn_tuple
  ):
      path = tmp_path / "invalid_ext_example.some_ext"
      with open(path, "w") as f:
          f.write("some stuff that shouldn't be read")
      with pytest.raises(
          MlflowException,
          match=f"with path '{path}' does not match any of the supported file extensions",
      ):
          _infer_artifact_type_and_ext(
              "invalid_ext_artifact", path, cm_fn_tuple
          )
  
file_path: mlflow/tests/models/test_artifacts.py
imports: import json
  import pathlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.artifacts import CsvEvaluationArtifact, ImageEvaluationArtifact, JsonEvaluationArtifact, NumpyEvaluationArtifact, ParquetEvaluationArtifact, PickleEvaluationArtifact, TextEvaluationArtifact, _infer_artifact_type_and_ext
  from mlflow.models.evaluation.default_evaluator import _CustomArtifact
label_desc: Use image node_id 7 for calling a global function with example usage: test_infer_artifact_type_and_ext_raise_exception_for_unsupported_ext(tmp_path, cm_fn_tuple) without return types