code: def test_init(self):
      md = FeatureModality()
      md.build(id_map=None)
      self.assertIsNone(md.features)
  
      md = FeatureModality(
          features=np.asarray(list(self.id_feature.values())),
          ids=list(self.id_feature.keys()),
          normalized=True,
      )
  
      global_iid_map = OrderedDict()
      global_iid_map.setdefault("a", len(global_iid_map))
      md.build(id_map=global_iid_map)
  
      self.assertEqual(md.features.shape[0], 2)
      self.assertEqual(md.features.shape[1], 10)
      self.assertEqual(md.feature_dim, 10)
  
file_path: cornac/tests/cornac/data/test_modality.py
imports: import unittest
  import numpy
  from collections import OrderedDict
  from cornac.data import FeatureModality
label_desc: Use image node_id 2 for calling the TestFeatureModality obj's underlying member method code with example usage: obj.test_init() without return types