class_docstr: This class shall serve as a representation of a parameter.
      
docstr: Docstring for the parameter to be used in lists of parameters
  
  Returns
  -------
  string or list of strings (if indent is None)
docstr_tok: ["Docstring","for","the","parameter","to","be","used","in","lists","of","parameters","Returns","--","--","--","-","string","or","list","of","strings","(","if","indent","is","None",")"]
code: def get_autodoc(
      self, name, indent="  ", width=70, default=None, has_default=False
  ):
      """Docstring for the parameter to be used in lists of parameters
  
      Returns
      -------
      string or list of strings (if indent is None)
      """
      paramsdoc = "%s" % name
      sdoc = None
      if self.constraints is not None:
          sdoc = self.constraints.short_description()
      elif "action" in self.cmd_kwargs and self.cmd_kwargs[
          "action"
      ] in ("store_true", "store_false"):
          sdoc = "bool"
      if sdoc is not None:
          if sdoc[0] == "(" and sdoc[-1] == ")":
              sdoc = sdoc[1:-1]
          nargs = self.cmd_kwargs.get("nargs", "")
          if isinstance(nargs, int):
              sdoc = "{}-item sequence of {}".format(nargs, sdoc)
          elif nargs == "+":
              sdoc = "non-empty sequence of {}".format(sdoc)
          elif nargs == "*":
              sdoc = "sequence of {}".format(sdoc)
          if self.cmd_kwargs.get("action", None) == "append":
              sdoc = "list of {}".format(sdoc)
          paramsdoc += " : %s" % sdoc
          if has_default:
              paramsdoc += ", optional"
      paramsdoc = [paramsdoc]
  
      doc = self._doc
      if doc is None:
          doc = ""
      doc = doc.strip()
      if len(doc) and not doc.endswith("."):
          doc += "."
      if has_default:
          doc += " [Default: %r]" % (default,)
      # Explicitly deal with multiple spaces, for some reason
      # replace_whitespace is non-effective
      doc = _whitespace_re.sub(" ", doc)
      paramsdoc += [
          indent + x
          for x in textwrap.wrap(
              doc, width=width - len(indent), replace_whitespace=True
          )
      ]
      return "\n".join(paramsdoc)
  
file_path: datalad/datalad/support/param.py
imports: import re
  import textwrap
  import argparse
  from datalad.utils import getargspec
  from .constraints import expand_constraint_spec
label_desc: Use image node_id 2 for calling the Parameter obj's underlying member method code with example usage: obj.get_autodoc(name, indent, width, default, has_default) and returns: str