code: def test_schema_creation():
      # can create schema with named col specs
      Schema([ColSpec("double", "a"), ColSpec("integer", "b")])
  
      # can create schema with unnamed col specs
      Schema([ColSpec("double"), ColSpec("integer")])
  
      # can create schema with multiple named tensor specs
      Schema(
          [
              TensorSpec(np.dtype("float64"), (-1,), "a"),
              TensorSpec(np.dtype("uint8"), (-1,), "b"),
          ]
      )
  
      # can create schema with single unnamed tensor spec
      Schema([TensorSpec(np.dtype("float64"), (-1,))])
  
      # combination of tensor and col spec is not allowed
      with pytest.raises(MlflowException, match="Please choose one of"):
          Schema(
              [
                  TensorSpec(np.dtype("float64"), (-1,)),
                  ColSpec("double"),
              ]
          )
  
      # combination of named and unnamed inputs is not allowed
      with pytest.raises(
          MlflowException,
          match="Creating Schema with a combination of named and unnamed inputs",
      ):
          Schema(
              [
                  TensorSpec(np.dtype("float64"), (-1,), "blah"),
                  TensorSpec(np.dtype("float64"), (-1,)),
              ]
          )
  
      with pytest.raises(
          MlflowException,
          match="Creating Schema with a combination of named and unnamed inputs",
      ):
          Schema([ColSpec("double", "blah"), ColSpec("double")])
  
      # multiple unnamed tensor specs is not allowed
      with pytest.raises(
          MlflowException,
          match="Creating Schema with multiple unnamed TensorSpecs is not supported",
      ):
          Schema(
              [
                  TensorSpec(np.dtype("double"), (-1,)),
                  TensorSpec(np.dtype("double"), (-1,)),
              ]
          )
  
imports: import datetime
  import json
  import math
  import re
  import numpy
  import pandas
  import pyspark
  import pyspark.sql.types
  import pytest
  from scipy.sparse import csc_matrix, csr_matrix
  from mlflow.exceptions import MlflowException
  from mlflow.models.utils import _enforce_tensor_spec
  from mlflow.pyfunc import _parse_spark_datatype
  from mlflow.types import DataType
  from mlflow.types.schema import Array, ColSpec, Object, ParamSchema, ParamSpec, Property, Schema, TensorSpec
  from mlflow.types.utils import _get_tensor_shape, _infer_colspec_type, _infer_param_schema, _infer_schema, _validate_input_dictionary_contains_only_strings_and_lists_of_strings
label_desc: Use image node_id 6 for calling a global function with example usage: test_schema_creation() without return types