code: def moments(
      x,
      axes,
      shift=None,  # pylint: disable=unused-argument
      name=None,
      keep_dims=None,
      keepdims=None,
  ):
      """Calculate the mean and variance of `x`.
  
      The mean and variance are calculated by aggregating the contents of `x`
      across `axes`.  If `x` is 1-D and `axes = [0]` this is just the mean
      and variance of a vector.
  
      Note: shift is currently not used; the true mean is computed and used.
  
      When using these moments for batch normalization (see
      `tf.nn.batch_normalization`):
  
       * for so-called "global normalization", used with convolutional filters with
         shape `[batch, height, width, depth]`, pass `axes=[0, 1, 2]`.
       * for simple batch normalization pass `axes=[0]` (batch only).
  
      Args:
        x: A `Tensor`.
        axes: Array of ints.  Axes along which to compute mean and
          variance.
        shift: Not used in the current implementation
        name: Name used to scope the operations that compute the moments.
        keep_dims: produce moments with the same dimensionality as the input.
        keepdims: Alias to keep_dims.
  
      Returns:
        Two `Tensor` objects: `mean` and `variance`.
      """
      keep_dims = deprecated_argument_lookup(
          "keepdims", keepdims, "keep_dims", keep_dims
      )
      if keep_dims is None:
          keep_dims = False
      with ops.name_scope(name, "moments", [x, axes]):
          # The dynamic range of fp16 is too limited to support the collection of
          # sufficient statistics. As a workaround we simply perform the operations
          # on 32-bit floats before converting the mean and variance back to fp16
          y = (
              math_ops.cast(x, dtypes.float32)
              if x.dtype == dtypes.float16
              else x
          )
          # Compute true mean while keeping the dims for proper broadcasting.
          mean = math_ops.reduce_mean(
              y, axes, keepdims=True, name="mean"
          )
          # sample variance, not unbiased variance
          # Note: stop_gradient does not change the gradient that gets
          #       backpropagated to the mean from the variance calculation,
          #       because that gradient is zero
          variance = math_ops.reduce_mean(
              math_ops.squared_difference(
                  y, array_ops.stop_gradient(mean)
              ),
              axes,
              keepdims=True,
              name="variance",
          )
          if not keep_dims:
              mean = array_ops.squeeze(mean, axes)
              variance = array_ops.squeeze(variance, axes)
          if x.dtype == dtypes.float16:
              return (
                  math_ops.cast(mean, dtypes.float16),
                  math_ops.cast(variance, dtypes.float16),
              )
          else:
              return (mean, variance)
  
imports: import math
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import candidate_sampling_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import ctc_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import embedding_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gen_sparse_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_fused_batch_norm_grad
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import device_context
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.deprecation import deprecated_args
  from tensorflow.python.util.deprecation import deprecated_argument_lookup
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 19 for calling a global function with example usage: moments(x, axes, shift, name, keep_dims, keepdims) and returns: math_ops,  math_ops, mean,  variance