code: def test_sample_data_function(self):
      X = np.random.random((10, 4))
      sampled_weights = sofm.sample_data(X, features_grid=(7, 1))
      self.assertEqual(sampled_weights.shape, (4, 7))
  
      X = np.random.random((3, 4))
      sampled_weights = sofm.sample_data(X, features_grid=(7, 1))
      self.assertEqual(sampled_weights.shape, (4, 7))
  
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 2 for calling the SOFMWeightInitializationTestCase obj's underlying member method code with example usage: obj.test_sample_data_function() without return types