code: def int_to_bit(x_int, num_bits, base=2):
      """Turn x_int representing numbers into a bitwise (lower-endian) tensor.
  
      Args:
        x_int: Tensor containing integer to be converted into base notation.
        num_bits: Number of bits in the representation.
        base: Base of the representation.
  
      Returns:
        Corresponding number expressed in base.
      """
      x_l = tf.to_int32(tf.expand_dims(x_int, axis=-1))
      x_labels = [
          tf.floormod(
              tf.floordiv(tf.to_int32(x_l), tf.to_int32(base) ** i),
              tf.to_int32(base),
          )
          for i in range(num_bits)
      ]
      res = tf.concat(x_labels, axis=-1)
      return tf.to_float(res)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from functools import partial
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_image_attention
  from tensor2tensor.layers import common_layers
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 6 for calling a global function with example usage: int_to_bit(x_int, num_bits, base) and returns: tf