code: def exception(
      type,
      input_data,
      number_cluster,
      number_represent_points,
      compression,
      ccore_flag,
  ):
      try:
          if isinstance(input_data, str):
              sample = read_sample(input_data)
          else:
              sample = input_data
  
          cure_instance = cure(
              sample,
              number_cluster,
              number_represent_points,
              compression,
              ccore=ccore_flag,
          )
          cure_instance.process()
  
      except type:
          return
  
      except Exception as ex:
          raise AssertionError(
              "Expected: '%s', Actual: '%s'" % (type, type(ex).__name__)
          )
  
      raise AssertionError("Expected: '%s', Actual: 'None'" % type)
  
file_path: pyclustering/pyclustering/cluster/tests/cure_templates.py
imports: import numpy
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
  from pyclustering.utils import read_sample
  from pyclustering.cluster.cure import cure
  from pyclustering.cluster.encoder import type_encoding, cluster_encoder
  from pyclustering.tests.assertion import assertion
  from random import random
label_desc: Use image node_id 4 for calling the CureTestTemplates obj's underlying member method code with example usage: obj.exception(type, input_data, number_cluster, number_represent_points, compression, ccore_flag) without return types