code: def canonical_numeric_dtype(dtype):
      """Returns int64 for int dtypes and float32 for float dtypes."""
      if dtype.is_floating:
          return tf.float32
      elif dtype.is_integer:
          return tf.int64
      else:
          raise ValueError("Bad dtype {}".format(dtype))
  
imports: import os
  import tempfile
  from typing import Dict, Iterable, List, Optional, Tuple
  from absl import logging
  import apache_beam
  import pyarrow
  import tensorflow
  import tensorflow_transform
  import tensorflow_transform.beam
  from tensorflow_transform.beam.tft_beam_io import transform_fn_io
  from tensorflow_transform import test_case
  from tensorflow_transform.beam import test_helpers
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tfx_bsl.coders import example_coder
  import unittest
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: canonical_numeric_dtype(dtype) and returns: tf, tf