code: def test_edge_convolution_template_preset_max(self):
      data = np.array(((1, 2), (3, 4), (5, 6), (7, 8)), np.float32)
      neighbors = np.array(
          ((0, 1, 0, 1), (0, 0, 1, 0), (1, 1, 1, 0), (0, 0, 1, 1)),
          np.float32,
      )
      neighbors = _dense_to_sparse(neighbors)
      true = np.array(
          ((8, 10), (8, 10), (10, 12), (14, 16)), np.float32
      )
  
      with self.subTest("max_sum"):
          max_sum = gc.edge_convolution_template(
              data=data,
              neighbors=neighbors,
              sizes=None,
              edge_function=lambda x, y: x + y,
              reduction="max",
              edge_function_kwargs=dict(),
          )
  
          self.assertAllEqual(max_sum, true)
  
      with self.subTest("max_sum_scaled"):
          # Max reduction ignores the weights, so scaling the neighbors weights
          # should not change the result.
          max_sum_scaled = gc.edge_convolution_template(
              data=data,
              neighbors=neighbors * 10.0,
              sizes=None,
              edge_function=lambda x, y: x + y,
              reduction="max",
              edge_function_kwargs=dict(),
          )
  
          self.assertAllEqual(max_sum_scaled, true)
  
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 12 for calling the EdgeConvolutionTemplateTests obj's underlying member method code with example usage: obj.test_edge_convolution_template_preset_max() without return types