code: def test_schema_and_profile_with_multi_tensor_features_and_targets(
      features, targets
  ):
      source_uri = "test:/my/test/uri"
      source = TestDatasetSource._resolve(source_uri)
      dataset = NumpyDataset(
          features=features, targets=targets, source=source
      )
  
      assert isinstance(dataset.schema, TensorDatasetSchema)
      assert dataset.schema.features == _infer_schema(features)
      assert dataset.schema.targets == _infer_schema(targets)
  
      if isinstance(features, dict):
          assert {
              "features_shape": {
                  key: array.shape for key, array in features.items()
              },
              "features_size": {
                  key: array.size for key, array in features.items()
              },
              "features_nbytes": {
                  key: array.nbytes for key, array in features.items()
              },
          }.items() <= dataset.profile.items()
      else:
          assert {
              "features_shape": features.shape,
              "features_size": features.size,
              "features_nbytes": features.nbytes,
          }.items() <= dataset.profile.items()
  
      if isinstance(targets, dict):
          assert {
              "targets_shape": {
                  key: array.shape for key, array in targets.items()
              },
              "targets_size": {
                  key: array.size for key, array in targets.items()
              },
              "targets_nbytes": {
                  key: array.nbytes for key, array in targets.items()
              },
          }.items() <= dataset.profile.items()
      else:
          assert {
              "targets_shape": targets.shape,
              "targets_size": targets.size,
              "targets_nbytes": targets.nbytes,
          }.items() <= dataset.profile.items()
  
imports: import json
  import numpy
  import pandas
  import pytest
  import mlflow.data
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.filesystem_dataset_source import FileSystemDatasetSource
  from mlflow.data.numpy_dataset import NumpyDataset
  from mlflow.data.pyfunc_dataset_mixin import PyFuncInputsOutputs
  from mlflow.data.schema import TensorDatasetSchema
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.utils import _infer_schema
  from tests.resources.data.dataset_source import TestDatasetSource
label_desc: Use image node_id 3 for calling a global function with example usage: test_schema_and_profile_with_multi_tensor_features_and_targets(features, targets) without return types