code: def test_log_and_load_tf2_module(tf2_toy_model):
      with mlflow.start_run():
          model_info = mlflow.tensorflow.log_model(
              tf2_toy_model.model, "model"
          )
  
      model_uri = model_info.model_uri
      loaded_model = mlflow.tensorflow.load_model(model_uri)
      predictions = loaded_model(tf2_toy_model.inference_data).numpy()
      np.testing.assert_allclose(
          predictions,
          tf2_toy_model.expected_results,
      )
  
      loaded_model2 = mlflow.pyfunc.load_model(model_uri)
      predictions2 = loaded_model2.predict(tf2_toy_model.inference_data)
      assert isinstance(predictions2, np.ndarray)
      np.testing.assert_allclose(
          predictions2,
          tf2_toy_model.expected_results,
      )
  
file_path: mlflow/tests/tensorflow/test_tensorflow2_core_model_export.py
imports: import collections
  import os
  from unittest import mock
  import numpy
  import pytest
  import tensorflow
  import mlflow.tensorflow
  from mlflow.models import Model, infer_signature
label_desc: Use image node_id 3 for calling a global function with example usage: test_log_and_load_tf2_module(tf2_toy_model) without return types