code: def _test_convert_legacy_structure_combinations():
      cases = [
          (
              dtypes.float32,
              tensor_shape.TensorShape([]),
              tensor.Tensor,
              tensor.TensorSpec([], dtypes.float32),
          ),
          (
              dtypes.int32,
              tensor_shape.TensorShape([2, 2]),
              sparse_tensor.SparseTensor,
              sparse_tensor.SparseTensorSpec([2, 2], dtypes.int32),
          ),
          (
              dtypes.int32,
              tensor_shape.TensorShape([None, True, 2, 2]),
              tensor_array_ops.TensorArray,
              tensor_array_ops.TensorArraySpec(
                  [2, 2],
                  dtypes.int32,
                  dynamic_size=None,
                  infer_shape=True,
              ),
          ),
          (
              dtypes.int32,
              tensor_shape.TensorShape([True, None, 2, 2]),
              tensor_array_ops.TensorArray,
              tensor_array_ops.TensorArraySpec(
                  [2, 2],
                  dtypes.int32,
                  dynamic_size=True,
                  infer_shape=None,
              ),
          ),
          (
              dtypes.int32,
              tensor_shape.TensorShape([True, False, 2, 2]),
              tensor_array_ops.TensorArray,
              tensor_array_ops.TensorArraySpec(
                  [2, 2],
                  dtypes.int32,
                  dynamic_size=True,
                  infer_shape=False,
              ),
          ),
          (
              dtypes.int32,
              tensor_shape.TensorShape([2, None]),
              ragged_tensor.RaggedTensorSpec(
                  [2, None], dtypes.int32, 1
              ),
              ragged_tensor.RaggedTensorSpec(
                  [2, None], dtypes.int32, 1
              ),
          ),
          (
              {"a": dtypes.float32, "b": (dtypes.int32, dtypes.string)},
              {
                  "a": tensor_shape.TensorShape([]),
                  "b": (
                      tensor_shape.TensorShape([2, 2]),
                      tensor_shape.TensorShape([]),
                  ),
              },
              {
                  "a": tensor.Tensor,
                  "b": (sparse_tensor.SparseTensor, tensor.Tensor),
              },
              {
                  "a": tensor.TensorSpec([], dtypes.float32),
                  "b": (
                      sparse_tensor.SparseTensorSpec(
                          [2, 2], dtypes.int32
                      ),
                      tensor.TensorSpec([], dtypes.string),
                  ),
              },
          ),
      ]
  
      def reduce_fn(x, y):
          (
              output_types,
              output_shapes,
              output_classes,
              expected_structure,
          ) = y
          return x + combinations.combine(
              output_types=output_types,
              output_shapes=output_shapes,
              output_classes=output_classes,
              expected_structure=expected_structure,
          )
  
      return functools.reduce(reduce_fn, cases, [])
  
imports: import collections
  import dataclasses
  import functools
  from absl.testing import parameterized
  import numpy
  import wrapt
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.data.util import structure
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import test
  from tensorflow.python.util.compat import collections_abc
label_desc: Use image node_id 7 for calling a global function with example usage: _test_convert_legacy_structure_combinations() and returns: functools, unknown