code: def _validate_sql(sql_query: Text, schema: schema_pb2.Schema):
      arrow_schema = example_coder.ExamplesToRecordBatchDecoder(
          schema.SerializeToString()
      ).ArrowSchema()
      formatted_query = slicing_util.format_slice_sql_query(sql_query)
      try:
          sql_util.RecordBatchSQLSliceQuery(
              formatted_query, arrow_schema
          )
      except Exception as e:  # pylint: disable=broad-except
          # The schema passed to TFDV initially may be incomplete, so we can't crash
          # on what may be an error caused by missing features.
          logging.error(
              "One of the slice SQL query %s raised an exception: %s.",
              sql_query,
              repr(e),
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import json
  import logging
  import types
  from typing import Dict, List, Optional, Text, Union
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import example_weight_map
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import slicing_util
  from tfx_bsl.arrow import sql_util
  from tfx_bsl.coders import example_coder
  from tfx_bsl.public.proto import slicing_spec_pb2
  from google.protobuf import json_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_sql(sql_query, schema) without return types