code: def make_tensor_to_arrow_converter(
      schema: schema_pb2.Schema,
  ) -> tensor_to_arrow.TensorsToRecordBatchConverter:
      """Constructs a `tf.Tensor` to `pa.RecordBatch` converter."""
      # Ragged sequence features will have an additional (sequence) dimension that
      # doesn't come from feature partition. Hence, we need to generate type spec
      # accordingly.
      ragged_sequence_features = set()
      feature_specs = schema_utils.schema_as_feature_spec(
          schema
      ).feature_spec
      for feature in schema.feature:
          if feature.type == schema_pb2.FeatureType.STRUCT:
              for child_feature in feature.struct_domain.feature:
                  ragged_sequence_features.add(child_feature.name)
      type_specs = get_type_specs_from_feature_specs(
          feature_specs, frozenset(ragged_sequence_features)
      )
  
      # Make sure that SparseFeatures are handled as generic SparseTensors as
      # opposed to VarLenSparse. Note that at this point only sparse outputs with
      # rank >2 are inferred as SparseFeatures, but this is likely to change.
      sparse_tensor_names = set()
      for name, spec in feature_specs.items():
          if isinstance(spec, tf.io.SparseFeature):
              sparse_tensor_names.add(name)
      options = tensor_to_arrow.TensorsToRecordBatchConverter.Options(
          sparse_tensor_value_column_name_template=schema_inference.SPARSE_VALUES_NAME_TEMPLATE,
          sparse_tensor_index_column_name_template=schema_inference.SPARSE_INDICES_NAME_TEMPLATE,
          generic_sparse_tensor_names=frozenset(sparse_tensor_names),
      )
      return tensor_to_arrow.TensorsToRecordBatchConverter(
          type_specs, options
      )
  
imports: import functools
  import os
  import re
  from typing import Callable, Dict, List, Mapping, Optional, FrozenSet
  from absl import logging
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import annotators
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_context
  from tensorflow_transform import graph_tools
  from tensorflow_transform import schema_inference
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.output_wrapper import TFTransformOutput
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow_transform.saved import saved_transform_io_v2
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import metadata_io
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx_bsl.coders import example_coder
  from tfx_bsl.tfxio import tensor_to_arrow
  from tensorflow.python.eager import function
  from tensorflow.python.framework import ops
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 10 for calling a global function with example usage: make_tensor_to_arrow_converter(schema) and returns: tensor_to_arrow