docstr: Test convolution when the graph only has self edges.
code: def test_feature_steered_convolution_only_self_edges(
      self,
      batch_size,
      num_vertices,
      in_channels,
      out_channels,
      num_weight_matrices,
  ):
      """Test convolution when the graph only has self edges."""
      data, neighbors = _random_data(
          batch_size,
          num_vertices,
          in_channels,
          padding=False,
          only_self_edges=True,
      )
      u, v, c, w, b = _random_variables(
          in_channels, out_channels, num_weight_matrices
      )
  
      with self.subTest(name="w=0_expect_output=b"):
          y = gc.feature_steered_convolution(
              data=data,
              neighbors=neighbors,
              sizes=None,
              var_u=u,
              var_v=v,
              var_c=c,
              var_w=tf.zeros_like(w),
              var_b=b,
          )
          y_expected = tf.broadcast_to(b, y.shape)
  
          self.assertAllEqual(y, y_expected)
  
      with self.subTest(name="translation_invariant_self_edges"):
          y = gc.feature_steered_convolution(
              data=data,
              neighbors=neighbors,
              sizes=None,
              var_u=u,
              var_v=-u,
              var_c=c,
              var_w=w,
              var_b=b,
          )
          q = tf.reshape(
              tf.exp(c) / tf.reduce_sum(input_tensor=tf.exp(c)),
              (num_weight_matrices, 1, 1),
          )
          if batch_size > 0:
              q_times_w = tf.reduce_sum(
                  input_tensor=q * w, axis=0, keepdims=True
              )
              q_times_w = tf.tile(q_times_w, (batch_size, 1, 1))
          else:
              q_times_w = tf.reduce_sum(input_tensor=q * w, axis=0)
          y_expected = tf.matmul(data, q_times_w) + tf.broadcast_to(
              b, y.shape
          )
  
          self.assertAllClose(y, y_expected)
  
      with self.subTest(name="constant_signal"):
          if batch_size > 0:
              constant_data = np.tile(
                  np.random.uniform(
                      size=(batch_size, 1, in_channels)
                  ).astype(np.float32),
                  (1, num_vertices, 1),
              )
          else:
              constant_data = np.tile(
                  np.random.uniform(size=(1, in_channels)).astype(
                      np.float32
                  ),
                  (num_vertices, 1),
              )
          y = gc.feature_steered_convolution(
              data=constant_data,
              neighbors=neighbors,
              sizes=None,
              var_u=u,
              var_v=v,
              var_c=c,
              var_w=w,
              var_b=b,
          )
          if batch_size > 0:
              y_expected = tf.tile(y[:, :1, :], (1, num_vertices, 1))
          else:
              y_expected = tf.tile(y[:1, :], (num_vertices, 1))
  
          self.assertAllClose(y, y_expected)
  
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 5 for calling the GraphConvolutionTestFeatureSteeredConvolutionTests obj's underlying member method code with example usage: obj.test_feature_steered_convolution_only_self_edges(batch_size, num_vertices, in_channels, out_channels, num_weight_matrices) without return types