code: def _save_example(
      mlflow_model: Model,
      input_example: ModelInputExample,
      path: str,
      no_conversion=False,
  ):
      """
      Save example to a file on the given path and updates passed Model with example metadata.
  
      The metadata is a dictionary with the following fields:
        - 'artifact_path': example path relative to the model directory.
        - 'type': Type of example. Currently the supported values are 'dataframe' and 'ndarray'
        -  One of the following metadata based on the `type`:
              - 'pandas_orient': Used to store dataframes. Determines the json encoding for dataframe
                                 examples in terms of pandas orient convention. Defaults to 'split'.
              - 'format: Used to store tensors. Determines the standard used to store a tensor input
                         example. MLflow uses a JSON-formatted string representation of TF serving
                         input.
      :param mlflow_model: Model metadata that will get updated with the example metadata.
      :param path: Where to store the example file. Should be model the model directory.
      """
      if no_conversion:
          example_info = {
              INPUT_EXAMPLE_PATH: EXAMPLE_FILENAME,
              "type": "json_object",
          }
          try:
              with open(
                  os.path.join(path, example_info[INPUT_EXAMPLE_PATH]),
                  "w",
              ) as f:
                  json.dump(input_example, f, cls=NumpyEncoder)
          except Exception as e:
              raise MlflowException.invalid_parameter_value(
                  "Failed to save input example. Please make sure the input example is jsonable "
                  f"when no_conversion is True. Got error: {e}"
              ) from e
          else:
              mlflow_model.saved_input_example_info = example_info
      else:
          example = _Example(input_example)
          example.save(path)
          mlflow_model.saved_input_example_info = example.info
  
imports: import datetime
  import decimal
  import json
  import logging
  import os
  from copy import deepcopy
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import pandas
  from mlflow.exceptions import INVALID_PARAMETER_VALUE, MlflowException
  from mlflow.models import Model
  from mlflow.store.artifact.utils.models import get_model_name_and_version
  from mlflow.types import DataType, ParamSchema, ParamSpec, Schema, TensorSpec
  from mlflow.types.schema import Array, Object, Property
  from mlflow.types.utils import TensorsNotSupportedException, _infer_param_schema, clean_tensor_type
  from mlflow.utils.annotations import experimental
  from mlflow.utils.proto_json_utils import NumpyEncoder, dataframe_from_parsed_json, parse_tf_serving_input
  from mlflow.utils.uri import get_databricks_profile_uri_from_artifact_uri
label_desc: Use image node_id 2 for calling a global function with example usage: _save_example(mlflow_model, input_example, path, no_conversion) without return types