code: def test_raises_with_non_sum(self):
      class NonSumDPQuery(dp_query.DPQuery):
          def initial_sample_state(self, template=None):
              del template  # Unused.
              return None
  
          def accumulate_preprocessed_record(
              self, sample_state, preprocessed_record
          ):
              del sample_state, preprocessed_record  # Unused.
              return None
  
          def merge_sample_states(self, sample_state_1, sample_state_2):
              del sample_state_1, sample_state_2  # Unused.
              return None
  
          def get_noised_result(self, sample_state, global_state):
              del sample_state, global_state  # Unused.
              return None
  
      non_sum_query = NonSumDPQuery()
  
      # This should work.
      nested_query.NestedQuery(non_sum_query)
  
      # This should not.
      with self.assertRaises(TypeError):
          nested_query.NestedSumQuery(non_sum_query)
  
file_path: privacy/tensorflow_privacy/privacy/dp_query/nested_query_test.py
imports: import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import dp_query
  from tensorflow_privacy.privacy.dp_query import gaussian_query
  from tensorflow_privacy.privacy.dp_query import nested_query
  from tensorflow_privacy.privacy.dp_query import normalized_query
  from tensorflow_privacy.privacy.dp_query import test_utils
label_desc: Use image node_id 6 for calling the NestedQueryTest obj's underlying member method code with example usage: obj.test_raises_with_non_sum() and returns: None, None, None, None