code: def test_sofm_double_initialization_exception_cos_distance(self):
      sofm = algorithms.SOFM(
          n_inputs=2,
          n_outputs=3,
          verbose=False,
          distance="cos",
          weight="sample_from_data",
      )
      sofm.init_weights(X)
  
      with self.assertRaises(WeightInitializationError):
          sofm.init_weights(X)
  
imports: import math
  import numpy
  from neupy import algorithms
  from neupy.exceptions import WeightInitializationError
  from neupy.algorithms.competitive import sofm
  from neupy.algorithms.competitive.neighbours import gaussian_df
  from base import BaseTestCase
label_desc: Use image node_id 6 for calling the SOFMWeightInitializationTestCase obj's underlying member method code with example usage: obj.test_sofm_double_initialization_exception_cos_distance() without return types