code: def test_keywords_params_combine(self):
      matcher = KeywordsMatching.from_dict(
          {
              "path_to_search": "testing_data/images2d",
              "filename_contains": "_g",
              "filename_removefromid": "img|_g",
          }
      )
      f_list, s_list = matcher.matching_subjects_and_filenames()
      self.assertEqual(len(f_list), 10)
      self.assertEqual(len(s_list), 10)
  
      matcher_comp = KeywordsMatching.from_dict(
          {
              "path_to_search": "testing_data/images2d",
              "filename_not_contains": ("_m", "_u"),
              "filename_removefromid": "img|_g",
          }
      )
      f_comp, s_comp = matcher_comp.matching_subjects_and_filenames()
      self.assertEqual(f_comp, f_list)
      self.assertEqual(s_comp, s_list)
  
      matcher = KeywordsMatching.from_dict(
          {
              "path_to_search": "testing_data/images2d",
              "filename_removefromid": "img|_g|_m|_u",
          }
      )
      with self.assertRaisesRegexp(ValueError, ""):
          matcher.matching_subjects_and_filenames()
  
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 5 for calling the FileNameMatchingTest obj's underlying member method code with example usage: obj.test_keywords_params_combine() without return types