docstr: Determine how to display a parameter
  
  Emulates autosummary behavior if fake_autosummary
  
  Parameters
  ----------
  param : str
      The name of the parameter
  desc : list of str
      The parameter description as given in the docstring. This is
      ignored when autosummary logic applies.
  fake_autosummary : bool
      If True, autosummary-style behaviour will apply for params
      that are attributes of the class and have a docstring.
  
  Returns
  -------
  display_param : str
      The marked up parameter name for display. This may include a link
      to the corresponding attribute's own documentation.
  desc : list of str
      A list of description lines. This may be identical to the input
      ``desc``, if ``autosum is None`` or ``param`` is not a class
      attribute, or it will be a summary of the class attribute's
      docstring.
  
  Notes
  -----
  This does not have the autosummary functionality to display a method's
  signature, and hence is not used to format methods.  It may be
  complicated to incorporate autosummary's signature mangling, as it
  relies on Sphinx's plugin mechanism.
docstr_tok: ["Determine","how","to","display","a","parameter","Emulates","autosummary","behavior","if","fake_autosummary","Parameters","--","--","--","--","--","param",":","str","The","name","of","the","parameter","desc",":","list","of","str","The","parameter","description","as","given","in","the","docstring",".","This","is","ignored","when","autosummary","logic","applies",".","fake_autosummary",":","bool","If","True",",","autosummary-style","behaviour","will","apply","for","params","that","are","attributes","of","the","class","and","have","a","docstring",".","Returns","--","--","--","-","display_param",":","str","The","marked","up","parameter","name","for","display",".","This","may","include","a","link","to","the","corresponding","attribute","'s","own","documentation",".","desc",":","list","of","str","A","list","of","description","lines",".","This","may","be","identical","to","the","input","``","desc","``",",","if","``","autosum","is","None","``","or","``","param","``","is","not","a","class","attribute",",","or","it","will","be","a","summary","of","the","class","attribute's","docstring",".","Notes","--","--","-","This","does","not","have","the","autosummary","functionality","to","display","a","method's","signature",",","and","hence","is","not","used","to","format","methods",".","It","may","be","complicated","to","incorporate","autosummary","'s","signature","mangling",",","as","it","relies","on","Sphinx","'s","plugin","mechanism","."]
code: def _process_param(self, param, desc, fake_autosummary):
      """Determine how to display a parameter
  
      Emulates autosummary behavior if fake_autosummary
  
      Parameters
      ----------
      param : str
          The name of the parameter
      desc : list of str
          The parameter description as given in the docstring. This is
          ignored when autosummary logic applies.
      fake_autosummary : bool
          If True, autosummary-style behaviour will apply for params
          that are attributes of the class and have a docstring.
  
      Returns
      -------
      display_param : str
          The marked up parameter name for display. This may include a link
          to the corresponding attribute's own documentation.
      desc : list of str
          A list of description lines. This may be identical to the input
          ``desc``, if ``autosum is None`` or ``param`` is not a class
          attribute, or it will be a summary of the class attribute's
          docstring.
  
      Notes
      -----
      This does not have the autosummary functionality to display a method's
      signature, and hence is not used to format methods.  It may be
      complicated to incorporate autosummary's signature mangling, as it
      relies on Sphinx's plugin mechanism.
      """
      param = param.strip()
      # XXX: If changing the following, please check the rendering when param
      # ends with '_', e.g. 'word_'
      # See https://github.com/numpy/numpydoc/pull/144
      display_param = "**%s**" % param
  
      if not fake_autosummary:
          return display_param, desc
  
      param_obj = getattr(self._obj, param, None)
      if not (
          callable(param_obj)
          or isinstance(param_obj, property)
          or inspect.isgetsetdescriptor(param_obj)
      ):
          param_obj = None
      obj_doc = pydoc.getdoc(param_obj)
  
      if not (param_obj and obj_doc):
          return display_param, desc
  
      prefix = getattr(self, "_name", "")
      if prefix:
          autosum_prefix = "~%s." % prefix
          link_prefix = "%s." % prefix
      else:
          autosum_prefix = ""
          link_prefix = ""
  
      # Referenced object has a docstring
      display_param = ":obj:`{} <{}{}>`".format(
          param, link_prefix, param
      )
      if obj_doc:
          # Overwrite desc. Take summary logic of autosummary
          desc = re.split("\n\\s*\n", obj_doc.strip(), 1)[0]
          # XXX: Should this have DOTALL?
          #      It does not in autosummary
          m = re.search(
              r"^([A-Z].*?\.)(?:\s|$)", " ".join(desc.split())
          )
          if m:
              desc = m.group(1).strip()
          else:
              desc = desc.partition("\n")[0]
          desc = desc.split("\n")
      return display_param, desc
  
imports: import re
  import inspect
  import textwrap
  import pydoc
  import collections
  import os
  from jinja2 import FileSystemLoader
  from jinja2.sandbox import SandboxedEnvironment
  import sphinx
  from sphinx.jinja2glue import BuiltinTemplateLoader
  from .docscrape import NumpyDocString, FunctionDoc, ClassDoc
label_desc: Use image node_id 10 for calling the SphinxDocString obj's underlying member method code with example usage: obj._process_param(param, desc, fake_autosummary) and returns: display_param,  desc, display_param,  desc, display_param,  desc