code: def merge(
      levels: List[type_alias.TensorLike], name: str = "pyramid_merge"
  ) -> tf.Tensor:
      """Merges the different levels of the pyramid back to an image.
  
      Args:
        levels: A list containing tensors of shape `[B, H_i, W_i, C]`, where `B` is
          the batch size, H_i and W_i are the height and width of the image for the
          level i, and `C` the number of channels of the image.
        name: A name for this op that defaults to "pyramid_merge".
  
      Returns:
          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.
  
      Raises:
        ValueError: If the shape of the elements of `levels` is not supported.
      """
      with tf.name_scope(name):
          levels = [
              tf.convert_to_tensor(value=level) for level in levels
          ]
  
          for index, level in enumerate(levels):
              shape.check_static(
                  tensor=level,
                  tensor_name="level {}".format(index),
                  has_rank=4,
              )
  
          image = levels[-1]
          kernel = _binomial_kernel(
              tf.shape(input=image)[3], dtype=image.dtype
          )
          for level in reversed(levels[:-1]):
              image = (
                  _upsample(image, kernel, tf.shape(input=level))
                  + level
              )
          return image
  
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 7 for calling a global function with example usage: merge(levels, name) and returns: image