code: def _mean_image_subtraction(image, means, num_channels):
      """Subtracts the given means from each image channel.
  
      For example:
        means = [123.68, 116.779, 103.939]
        image = _mean_image_subtraction(image, means)
  
      Note that the rank of `image` must be known.
  
      Args:
        image: a tensor of size [height, width, C].
        means: a C-vector of values to subtract from each channel.
        num_channels: number of color channels in the image that will be distorted.
  
      Returns:
        the centered image.
  
      Raises:
        ValueError: If the rank of `image` is unknown, if `image` has a rank other
          than three or if the number of channels in `image` doesn't match the
          number of values in `means`.
      """
      if image.get_shape().ndims != 3:
          raise ValueError("Input must be of size [height, width, C>0]")
  
      if len(means) != num_channels:
          raise ValueError(
              "len(means) must match the number of channels"
          )
  
      # We have a 1-D tensor of means; convert to 3-D.
      # Note(b/130245863): we explicitly call `broadcast` instead of simply
      # expanding dimensions for better performance.
      means = tf.broadcast_to(means, tf.shape(image))
  
      return image - means
  
file_path: autodist/examples/benchmark/utils/imagenet_preprocessing.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import logging
  import tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: _mean_image_subtraction(image, means, num_channels) and returns: unknown