code: def assert_params(param_string, **wanted_dct):
      source = (
          dedent(
              """
      def x(%s):
          pass
      """
          )
          % param_string
      )
  
      module = parse(source)
      funcdef = next(module.iter_funcdefs())
      dct = dict(
          (p.name.value, p.default and p.default.get_code())
          for p in funcdef.get_params()
      )
      assert dct == wanted_dct
      assert module.get_code() == source
  
imports: from textwrap import dedent
  from parso import parse
label_desc: Use image node_id 1 for calling a global function with example usage: assert_params(param_string) without return types