code: def test_pandas_orients_for_input_examples(
      pandas_df_with_all_types, df_without_columns, dict_of_ndarrays
  ):
      # test setting example with data frame with all supported data types
      with TempDir() as tmp:
          example = _Example(pandas_df_with_all_types)
          example.save(tmp.path())
          filename = example.info["artifact_path"]
          assert example.info["type"] == "dataframe"
          assert example.info["pandas_orient"] == "split"
          with open(tmp.path(filename)) as f:
              data = json.load(f)
              dataframe = pd.read_json(
                  json.dumps(data),
                  orient=example.info["pandas_orient"],
                  precise_float=True,
              )
              assert (
                  (
                      pandas_df_with_all_types.drop(columns=["binary"])
                      == dataframe.drop(columns=["binary"])
                  )
                  .all()
                  .all()
              )
  
      with TempDir() as tmp:
          example = _Example(df_without_columns)
          example.save(tmp.path())
          filename = example.info["artifact_path"]
          assert example.info["type"] == "dataframe"
          assert example.info["pandas_orient"] == "values"
          with open(tmp.path(filename)) as f:
              data = json.load(f)
              assert set(data.keys()) == {"data"}
              # NOTE: when no column names are provided (i.e. values orient),
              # saving an example adds a "data" key rather than directly storing the plain data
              data = data["data"]
              dataframe = pd.read_json(
                  json.dumps(data), orient=example.info["pandas_orient"]
              )
              assert (dataframe == df_without_columns).all().all()
  
      # pass dict with scalars
      with TempDir() as tmp:
          example = {"a": 1, "b": "abc"}
          x = _Example(example)
          x.save(tmp.path())
          filename = x.info["artifact_path"]
          assert x.info["type"] == "dataframe"
          assert x.info["pandas_orient"] == "split"
          with open(tmp.path(filename)) as f:
              parsed_json = json.load(f)
              dataframe = pd.read_json(
                  json.dumps(parsed_json),
                  orient=x.info["pandas_orient"],
              )
              assert (dataframe == example).all().all()
  
imports: import json
  import math
  from unittest import mock
  import numpy
  import pandas
  import pytest
  import sklearn.neighbors
  from scipy.sparse import csc_matrix, csr_matrix
  from sklearn import datasets
  from sklearn.base import BaseEstimator, ClassifierMixin
  import mlflow
  from mlflow.models import Model
  from mlflow.models.signature import ModelSignature, infer_signature
  from mlflow.models.utils import _Example, _read_sparse_matrix_from_json, _read_tensor_input_from_json
  from mlflow.types import DataType
  from mlflow.types.schema import ColSpec, Schema, TensorSpec
  from mlflow.types.utils import TensorsNotSupportedException
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.proto_json_utils import dataframe_from_raw_json
  from tests.helper_functions import AnyStringWith
label_desc: Use image node_id 8 for calling a global function with example usage: test_pandas_orients_for_input_examples(pandas_df_with_all_types, df_without_columns, dict_of_ndarrays) without return types