def _search_param_in_docstr(docstr, param_str):
 patterns = [re.compile((p % re.escape(param_str))) for p in DOCSTRING_PARAM_PATTERNS]
 found = None
 for pattern in patterns:
  match = pattern.search(docstr)
  if match:
   found = [_strip_rst_role(match.group(1))]
   break
 if (found is not None):
  return found
 found = _search_param_in_numpydocstr(docstr, param_str)
 if (found is not None):
  return found
 return []

def _search_param_in_docstr ( docstr , param_str ) : patterns = [ re . compile ( ( p % re . escape ( param_str ) ) ) for p in DOCSTRING_PARAM_PATTERNS ] found = None for pattern in patterns : match = pattern . search ( docstr ) if match : found = [ _strip_rst_role ( match . group ( 1 ) ) ] break if ( found is not None ) : return found found = _search_param_in_numpydocstr ( docstr , param_str ) if ( found is not None ) : return found return [ ]
search docstr for type of param_str .