code: def testEnumerateArrays(self):
      for (
          leaves_only,
          has_weights,
          wrap_flat_struct_in_list,
      ) in itertools.product(
          [True, False], [True, False], [True, False]
      ):
          actual_results = {}
          for (
              feature_path,
              feature_array,
              weights,
          ) in arrow_util.enumerate_arrays(
              _INPUT_RECORD_BATCH,
              _EXAMPLE_WEIGHT_MAP if has_weights else None,
              leaves_only,
              wrap_flat_struct_in_list,
          ):
              actual_results[feature_path] = (feature_array, weights)
  
          expected_results = {}
          # leaf fields
          for p in [
              ["f1"],
              ["w"],
              ["w_override1"],
              ["w_override2"],
              ["f2", "sf1"],
              ["f2", "sf2", "ssf1"],
              ["f3", "sf1"],
              ["f3", "sf2"],
          ]:
              feature_path = types.FeaturePath(p)
              expected_results[feature_path] = (
                  _FEATURES_TO_ARRAYS[feature_path].array,
                  _FEATURES_TO_ARRAYS[feature_path].weights
                  if has_weights
                  else None,
              )
          if not leaves_only:
              for p in [["f2"], ["f2", "sf2"], ["f3"]]:
                  feature_path = types.FeaturePath(p)
                  expected_array = _FEATURES_TO_ARRAYS[feature_path][0]
                  if wrap_flat_struct_in_list and pa.types.is_struct(
                      expected_array.type
                  ):
                      expected_array = array_util.ToSingletonListArray(
                          expected_array
                      )
                  expected_results[feature_path] = (
                      expected_array,
                      _FEATURES_TO_ARRAYS[feature_path].weights
                      if has_weights
                      else None,
                  )
  
          self.assertLen(actual_results, len(expected_results))
          for k, v in six.iteritems(expected_results):
              self.assertIn(k, actual_results)
              actual = actual_results[k]
              self.assertTrue(
                  actual[0].equals(v[0]),
                  "leaves_only={}; has_weights={}; "
                  "wrap_flat_struct_in_list={} feature={}; expected: {}; actual: {}".format(
                      leaves_only,
                      has_weights,
                      wrap_flat_struct_in_list,
                      k,
                      v,
                      actual,
                  ),
              )
              np.testing.assert_array_equal(actual[1], v[1])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from typing import Dict, Iterable, NamedTuple
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import pyarrow
  import six
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.utils.example_weight_map import ExampleWeightMap
  from tfx_bsl.arrow import array_util
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 7 for calling the ArrowUtilTest obj's underlying member method code with example usage: obj.testEnumerateArrays() without return types