code: def _downsample(
      image: type_alias.TensorLike, kernel: type_alias.TensorLike
  ) -> tf.Tensor:
      """Downsamples the image using a convolution with stride 2.
  
      Args:
        image: A tensor of shape `[B, H, W, C]`, where `B` is the batch size, `H`
          the height of the image, `W` the width of the image, and `C` the number of
          channels of the image.
        kernel: A tensor of shape `[H_k, W_k, C, C]`, where `H_k` and `W_k` are the
          height and width of the kernel.
  
      Returns:
        A tensor of shape `[B, H_d, W_d, C]`, where `H_d` and `W_d` are the height
        and width of the downsampled image.
  
      """
      return tf.nn.conv2d(
          input=image,
          filters=kernel,
          strides=[1, 2, 2, 1],
          padding="SAME",
      )
  
file_path: graphics/tensorflow_graphics/image/pyramid.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, List, Optional, Tuple
  import numpy
  from six.moves import range
  import tensorflow
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 1 for calling a global function with example usage: _downsample(image, kernel) and returns: tf