code: def _pack_into_int_12_28(value):
      """Implementation of `pack_into_int` for specific bitranges.
  
      This method corresponts to `(input_bitrange, target_bitrange)` form the
      `pack_into_int` method equal to `(12, 28)`. This method relies on the fact
      that 7 values in 12-bit bitrange can be packed into 3 values in 28-bitrange
      (7 = least_common_multiple(12, 28) / 12).
  
      It reshapes the input into matrix of 7 columns and performs operations on the
      columns of the matrix, thus vectorizing the operations and avoiding memory
      overhead of an earlier general implementation.
  
      Args:
        value: An integer Tensor to be packed with values in [0, 2**8 - 1].
  
      Returns:
        An integer Tensor representing `value` of the same dtype as `value`.
      """
      value = tf.reshape(value, [-1])
      extra_zeros = tf.zeros(
          tf.math.mod(-tf.shape(value), 7), value.dtype
      )
      val = tf.reshape(tf.concat([value, extra_zeros], 0), [-1, 7])
  
      a = (
          val[:, 0]
          + val[:, 1] * 2**12
          + tf.math.mod(val[:, 2], 2**4) * 2**24
      )
      b = (
          tf.math.floordiv(val[:, 2], 2**4)
          + val[:, 3] * 2**8
          + tf.math.mod(val[:, 4], 2**8) * 2**20
      )
      c = (
          tf.math.floordiv(val[:, 4], 2**8)
          + val[:, 5] * 2**4
          + val[:, 6] * 2**16
      )
  
      packed_val = tf.reshape(tf.stack([a, b, c], 1), [-1, 1])
      if extra_zeros.shape[0] in [3, 4]:
          # We added unnecessary sum of zeros to the representation.
          packed_val = tf.slice(
              packed_val, [0, 0], [packed_val.shape[0] - 1, 1]
          )
      if extra_zeros.shape[0] in [5, 6]:
          # We added unnecessary two sums of zeros to the representation.
          packed_val = tf.slice(
              packed_val, [0, 0], [packed_val.shape[0] - 2, 1]
          )
      return packed_val
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import math
  import numpy
  import tensorflow
label_desc: Use image node_id 14 for calling a global function with example usage: _pack_into_int_12_28(value) and returns: packed_val