class_docstr: Unit tests for the Transport NNKernels. 
docstr: Unit-test for testing that both kernels compute the same thing in certain cases.
      
docstr_tok: ["Unit-test","for","testing","that","both","kernels","compute","the","same","thing","in","certain","cases","."]
code: def test_sum_product_equivalence(self):
      """Unit-test for testing that both kernels compute the same thing in certain cases."""
      dist_type_vals = ["lp", "emd"]
      for dist_type in dist_type_vals:
          if dist_type == "lp":
              betas = self.lp_betas
              scales = [1]
          elif dist_type == "emd":
              betas = self.emd_betas
              scales = [1]
          sum_kernel = otmann.get_otmann_kernel_from_params(
              "sum",
              self.all_layer_labels,
              self.label_mismatch_penalty,
              self.non_assignment_penalty,
              otmann.MLP_STRUCTURAL_PENALTY_GROUPS,
              otmann.PATH_LENGTH_TYPES,
              self.mislabel_coeffs,
              self.struct_coeffs,
              dist_type,
              betas,
              scales,
          )
          prod_kernel = otmann.get_otmann_kernel_from_params(
              "prod",
              self.all_layer_labels,
              self.label_mismatch_penalty,
              self.non_assignment_penalty,
              otmann.MLP_STRUCTURAL_PENALTY_GROUPS,
              otmann.PATH_LENGTH_TYPES,
              self.mislabel_coeffs,
              self.struct_coeffs,
              dist_type,
              betas,
              scales,
          )
          sum_nn_K = sum_kernel(self.mlps)
          prod_nn_K = prod_kernel(self.mlps)
          assert np.linalg.norm(sum_nn_K - prod_nn_K) < _TOL
  
imports: import numpy
  from .None import otmann
  from .unittest_neural_network import generate_cnn_architectures, generate_mlp_architectures
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 3 for calling the DistSumNNKernelTestCase obj's underlying member method code with example usage: obj.test_sum_product_equivalence() without return types