code: def _drop_unsupported_columns_and_fetch_raw_data_column(
      record_batch: pa.RecordBatch,
  ) -> Tuple[pa.RecordBatch, Optional[np.ndarray]]:
      """Drops unsupported columns and fetches the raw data column.
  
      Currently, types that are not binary_like or ListArray[primitive types] are
      dropped.
  
      Args:
        record_batch: An Arrow RecordBatch.
  
      Returns:
        Arrow RecordBatch with only supported columns.
      """
      column_names, column_arrays = [], []
      serialized_examples = None
      for column_name, column_array in zip(
          record_batch.schema.names, record_batch.columns
      ):
          column_type = column_array.type
          if column_name == constants.ARROW_INPUT_COLUMN:
              assert _is_list_like(column_type) and _is_binary_like(
                  column_type.value_type
              ), (
                  "Invalid type for batched input key: {}. "
                  "Expected binary like.".format(column_type)
              )
              serialized_examples = np.asarray(column_array.flatten())
          # Currently we only handle columns of type list<primitive|binary_like>.
          # We ignore other columns as we cannot efficiently convert them into an
          # instance dict format.
          elif _is_list_like(
              column_type
          ) and _is_supported_arrow_value_type(column_type.value_type):
              column_names.append(column_name)
              column_arrays.append(column_array)
      return (
          pa.RecordBatch.from_arrays(column_arrays, column_names),
          serialized_examples,
      )
  
file_path: model-analysis/tensorflow_model_analysis/extractors/features_extractor.py
imports: import copy
  from typing import Mapping, Optional, Text, Tuple
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: _drop_unsupported_columns_and_fetch_raw_data_column(record_batch) and returns: pa,  serialized_examples