docstr: Use the numpydoc parser to extract components from existing func.
docstr_tok: ["Use","the","numpydoc","parser","to","extract","components","from","existing","func","."]
code: def from_function_params(cls, func):
      """Use the numpydoc parser to extract components from existing func."""
      params = NumpyDocString(pydoc.getdoc(func))["Parameters"]
      comp_dict = {}
      for p in params:
          name = p.name
          type = p.type
          desc = "\n    ".join(p.desc)
          comp_dict[name] = f"{name} : {type}\n    {desc}"
  
      return cls(comp_dict)
  
file_path: seaborn/seaborn/_docstrings.py
imports: import re
  import pydoc
  from .external.docscrape import NumpyDocString
label_desc: Use image node_id 4 for calling the DocstringComponents obj's underlying member method code with example usage: obj.from_function_params(cls, func) and returns: cls