code: def test_param():
      # having a parameter with no information is fine
      # it doesn't need a name, because it comes from the signature
      # of the actual implementation that is described
      p = Parameter()
      pname = "testname"
      # minimal docstring
      assert_equal(pname, p.get_autodoc("testname"))
      doc = "somedoc"
      p = Parameter(doc=doc)
      assert_equal(
          "%s\n  %s." % (pname, doc), p.get_autodoc("testname")
      )
      # constraints
      p = Parameter(
          doc=doc, constraints=cnstr.EnsureInt() | cnstr.EnsureStr()
      )
      autodoc = p.get_autodoc("testname")
      assert_true("int or str" in autodoc)
  
      with assert_raises(ValueError) as cmr:
          Parameter(unknown_arg=123)
      assert_in(
          "Detected unknown argument(s) for the Parameter: unknown_arg",
          str(cmr.value),
      )
  
file_path: datalad/datalad/tests/test_interface.py
imports: import re
  from datalad.interface.base import Interface, get_api_name
  from datalad.support import constraints
  from datalad.support.param import Parameter
  from datalad.tests.utils_pytest import assert_equal, assert_in, assert_is, assert_raises, assert_re_in, assert_true, swallow_outputs
label_desc: Use image node_id 1 for calling a global function with example usage: test_param() without return types