code: def templateTestAwardNeurons(
      file,
      rows,
      cols,
      time,
      expected_result,
      autostop,
      ccore_flag,
      parameters=None,
      **kwargs,
  ):
      store_load = kwargs.get("store_load", False)
  
      types = [
          type_conn.func_neighbor,
          type_conn.grid_eight,
          type_conn.grid_four,
          type_conn.honeycomb,
      ]
      sample = read_sample(file)
  
      if parameters is None:
          parameters = som_parameters()
  
      for structure in types:
          network = som(
              rows, cols, structure, parameters, ccore=ccore_flag
          )
          if store_load:
              dump_network = pickle.dumps(network)
              network = pickle.loads(dump_network)
  
          network.train(sample, time, autostop)
  
          winners = network.get_winner_number()
          assert winners == len(expected_result)
  
          if sorted(network.awards) != expected_result:
              network.show_network(awards=True)
              assert sorted(network.awards) == expected_result
  
          total_capture_points = 0
          for points in network.capture_objects:
              total_capture_points += len(points)
  
          assert total_capture_points == sum(expected_result)
  
          del network
  
file_path: pyclustering/pyclustering/nnet/tests/som_templates.py
imports: import pickle
  import matplotlib
  from pyclustering.nnet.som import som, type_conn, som_parameters
  from pyclustering.utils import read_sample
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
label_desc: Use image node_id 1 for calling the SomTestTemplates obj's underlying member method code with example usage: obj.templateTestAwardNeurons(file, rows, cols, time, expected_result, autostop, ccore_flag, parameters) without return types