code: def unpool(
      data: type_alias.TensorLike,
      pool_map: type_alias.TensorLike,
      sizes: type_alias.TensorLike,
      name: str = "graph_pooling_unpool",
  ) -> tf.Tensor:
      #  pyformat: disable
      r"""Graph upsampling by inverting the pooling map.
  
      Upsamples a graph by applying a pooling map in reverse. The inputs `pool_map`
      and `sizes` are the same as used for pooling:
  
      >>> pooled = pool(data, pool_map, sizes)
      >>> upsampled = unpool(pooled, pool_map, sizes)
  
      The shorthands used below are
        `V1`: The number of vertices in the input data.
        `V2`: The number of vertices in the unpooled output data.
        `C`: The number of channels in the data.
  
      Note:
        In the following, A1 to A3 are optional batch dimensions. Only up to three
        batch dimensions are supported due to limitations with TensorFlow's
        dense-sparse multiplication.
  
      Please see the documentation for `graph_pooling.pool` for a detailed
      interpretation of the inputs `pool_map` and `sizes`.
  
      Args:
        data: A `float` tensor with shape `[A1, ..., A3, V1, C]`.
        pool_map: A `SparseTensor` with the same type as `data` and with shape
          `[A1, ..., A3, V1, V2]`. The features for vertex `v1` are computed by
          pooling over the entries in `pool_map[A1, ..., A3, v1, :]`. This function
          applies this pooling map in reverse.
        sizes: An `int` tensor of shape `[A1, ..., A3, 2]` indicating the true
          input sizes in case of padding (`sizes=None` indicates no padding):
          `sizes[A1, ..., A3, 0] <= V1` and `sizes[A1, ..., A3, 1] <= V2`.
        name: A name for this op. Defaults to 'graph_pooling_unpool'.
  
      Returns:
        Tensor with shape `[A1, ..., A3, V2, C]`.
  
      Raises:
        TypeError: if the input types are invalid.
        ValueError: if the input dimensions are invalid.
      """
      #  pyformat: enable
      with tf.name_scope(name):
          data = tf.convert_to_tensor(value=data)
          pool_map = tf.compat.v1.convert_to_tensor_or_sparse_tensor(
              value=pool_map
          )
          if sizes is not None:
              sizes = tf.convert_to_tensor(value=sizes)
          utils.check_valid_graph_unpooling_input(data, pool_map, sizes)
  
          # Reverse pool_map and sizes.
          pool_map_ndims = pool_map.shape.ndims
          permutation = tf.concat(
              (
                  tf.range(pool_map_ndims - 2),
                  (pool_map_ndims - 1, pool_map_ndims - 2),
              ),
              axis=0,
          )
          pool_map_transpose = tf.sparse.transpose(
              pool_map, permutation
          )
          row_sum = tf.sparse.reduce_sum(
              tf.abs(pool_map_transpose), keepdims=True, axis=-1
          )
          normalize_weights = tf.where(
              tf.equal(row_sum, 0), row_sum, 1.0 / row_sum
          )
          pool_map_normalize = normalize_weights * pool_map_transpose
  
          if sizes is not None:
              sizes = tf.reverse(sizes, axis=(-1,))
  
          return pool(data, pool_map_normalize, sizes)
  
file_path: graphics/tensorflow_graphics/geometry/convolution/graph_pooling.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable
  import tensorflow
  from tensorflow_graphics.geometry.convolution import utils
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 2 for calling a global function with example usage: unpool(data, pool_map, sizes, name) and returns: pool