code: def test_model_signature_with_colspec():
      signature1 = ModelSignature(
          inputs=Schema(
              [ColSpec(DataType.boolean), ColSpec(DataType.binary)]
          ),
          outputs=Schema(
              [
                  ColSpec(name=None, type=DataType.double),
                  ColSpec(name=None, type=DataType.double),
              ]
          ),
      )
      signature2 = ModelSignature(
          inputs=Schema(
              [ColSpec(DataType.boolean), ColSpec(DataType.binary)]
          ),
          outputs=Schema(
              [
                  ColSpec(name=None, type=DataType.double),
                  ColSpec(name=None, type=DataType.double),
              ]
          ),
      )
      assert signature1 == signature2
      signature3 = ModelSignature(
          inputs=Schema(
              [ColSpec(DataType.boolean), ColSpec(DataType.binary)]
          ),
          outputs=Schema(
              [
                  ColSpec(name=None, type=DataType.float),
                  ColSpec(name=None, type=DataType.double),
              ]
          ),
      )
      assert signature3 != signature1
      as_json = json.dumps(signature1.to_dict())
      signature4 = ModelSignature.from_dict(json.loads(as_json))
      assert signature1 == signature4
      signature5 = ModelSignature(
          inputs=Schema(
              [ColSpec(DataType.boolean), ColSpec(DataType.binary)]
          ),
          outputs=None,
      )
      as_json = json.dumps(signature5.to_dict())
      signature6 = ModelSignature.from_dict(json.loads(as_json))
      assert signature5 == signature6
  
imports: import json
  import numpy
  import pandas
  import pyspark
  import pytest
  from sklearn.ensemble import RandomForestRegressor
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model, ModelSignature, infer_signature, set_signature
  from mlflow.models.model import get_model_info
  from mlflow.types import DataType
  from mlflow.types.schema import Array, ColSpec, ParamSchema, ParamSpec, Schema, TensorSpec
label_desc: Use image node_id 1 for calling a global function with example usage: test_model_signature_with_colspec() without return types