code: def test_signature_inference_infers_input_and_output_as_expected():
      sig0 = infer_signature(np.array([1]))
      assert sig0.inputs is not None
      assert sig0.outputs is None
      sig1 = infer_signature(np.array([1]), np.array([1]))
      assert sig1.inputs == sig0.inputs
      assert sig1.outputs == sig0.inputs
  
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 4 for calling a global function with example usage: test_signature_inference_infers_input_and_output_as_expected() without return types