code: def test_from_dict(self):
      with self.assertRaisesRegexp(ValueError, ""):
          KeywordsMatching.from_dict({"path_to_search": "wrong_folder"})
      matcher = KeywordsMatching.from_dict(
          {"path_to_search": "testing_data/images2d"}
      )
      f_list, s_list = matcher.matching_subjects_and_filenames()
      self.assertEqual(len(f_list), 30)
      self.assertEqual(len(s_list), 30)
      self.assertEqual(s_list[0][0], "img0_g")
  
file_path: NiftyNet/tests/filename_matching_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.utilities.filename_matching import KeywordsMatching
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 2 for calling the FileNameMatchingTest obj's underlying member method code with example usage: obj.test_from_dict() without return types