docstr: Test the expected result with laplacian smoothing.
  
  Laplacian smoothing for meshes is defined as
  $$y_i = \frac{1}{|\mathcal{N(i)}|} \sum_{j \in \mathcal{N(i)}} x_j$$
  
  This can be computed using `edge_convolution_template` with `f(x, y)->y`.
code: def test_edge_convolution_template_laplacian_smoothing(self):
      r"""Test the expected result with laplacian smoothing.
  
      Laplacian smoothing for meshes is defined as
      $$y_i = \frac{1}{|\mathcal{N(i)}|} \sum_{j \in \mathcal{N(i)}} x_j$$
  
      This can be computed using `edge_convolution_template` with `f(x, y)->y`.
      """
  
      # We can reuse `self._pass_through(x, y)->y` as the smoothing functional.
      with self.subTest(name="only_self_edges_random"):
          num_vertices = 500
          data = np.random.uniform(size=(num_vertices, 5))
          neighbors = tf.sparse.eye(
              num_vertices, dtype=tf.as_dtype(data.dtype)
          )
  
          data_smoothed = gc.edge_convolution_template(
              data=data,
              neighbors=neighbors,
              sizes=None,
              edge_function=self._pass_through,
              reduction="weighted",
              edge_function_kwargs=dict(),
          )
  
          self.assertAllEqual(data, data_smoothed)
  
      with self.subTest(name="circular_2d"):
          num_vertices = 500
          data, neighbors = self._circular_2d_data(num_vertices)
  
          data_smoothed = gc.edge_convolution_template(
              data=data,
              neighbors=neighbors,
              sizes=None,
              edge_function=self._pass_through,
              reduction="weighted",
              edge_function_kwargs=dict(),
          )
          # The smoothed points should have the same direction as the originals.
          data_smoothed_normalized = tf.nn.l2_normalize(
              data_smoothed, axis=-1
          )
  
          self.assertAllClose(data, data_smoothed_normalized)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  import tensorflow
  import tensorflow_graphics.geometry.convolution.graph_convolution
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 14 for calling the EdgeConvolutionTemplateTests obj's underlying member method code with example usage: obj.test_edge_convolution_template_laplacian_smoothing() without return types