code: def test_config_from_weights_valid(self):
      weights = os.path.join("a", "path", "to", "rdn-C3-D1-G7-G05-x2")
      arch_params = {
          "C": None,
          "D": None,
          "G": None,
          "G0": None,
          "x": None,
      }
      expected_params = {"C": 3, "D": 1, "G": 7, "G0": 5, "x": 2}
      name = "rdn"
      generated_param = utils.get_config_from_weights(
          w_path=weights, arch_params=arch_params, name=name
      )
      for p in expected_params:
          self.assertTrue(generated_param[p] == expected_params[p])
  
imports: import logging
  import os
  import unittest
  import yaml
  from unittest.mock import patch
  from ISR.utils import utils
label_desc: Use image node_id 6 for calling the UtilsClassTest obj's underlying member method code with example usage: obj.test_config_from_weights_valid() without return types