code: def _upsample(
      image: type_alias.TensorLike,
      kernel: type_alias.TensorLike,
      output_shape: Optional[type_alias.TensorLike] = None,
  ) -> tf.Tensor:
      """Upsamples the image using a transposed 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.
        output_shape: The output shape.
  
      Returns:
        A tensor of shape `[B, H_u, W_u, C]`, where `H_u` and `W_u` are the height
        and width of the upsampled image.
      """
      if output_shape is None:
          output_shape = tf.shape(input=image)
          output_shape = (
              output_shape[0],
              output_shape[1] * 2,
              output_shape[2] * 2,
              output_shape[3],
          )
      return tf.nn.conv2d_transpose(
          image,
          kernel * 4.0,
          output_shape=output_shape,
          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 5 for calling a global function with example usage: _upsample(image, kernel, output_shape) and returns: tf