code: def cast_ints_to_int32(features):
      f = {}
      for k, v in sorted(six.iteritems(features)):
          if v.dtype in [tf.int64, tf.uint8]:
              v = tf.to_int32(v)
          f[k] = v
      return f
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import multiprocessing
  import random
  import six
  from six.moves import range
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling a global function with example usage: cast_ints_to_int32(features) and returns: f