
    Mpj^
                     \    S SK r S SKrS SKrS SKJr  S SKJr  S SKJr  S r	\S 5       r
S rg)    N)	lru_cache)quote)	docscrapec                     U R                   n[        R                  " U S3U=(       d    S5      nUc  gUR                  S5      R	                  SS5      n[        U5       S[        U5       3nU SU 3$ )zURL to the relevant section of the docstring using a Text Fragment

https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments
z	 : (.+)\n N   `z,-z	#:~:text=)__doc__researchgroupreplacer   )estimator_class
param_namedoc_link	docstringm
param_typetext_fragments          [/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/sklearn/utils/_repr_html/common.pygenerate_link_to_param_docr      s}    
  ''I
		ZL
+Y_"=Ay  ##C,JZ()E*,=+>?MZy00    c                 .    [         R                  " U 5      $ N)r   NumpyDocString)r   s    r   scrape_estimator_docstringr   #   s    ##I..r   c                    [         R                  " U 5      nU(       a2  [        U5      =n(       a   XA    Vs0 s H  nUR                  U_M     nnO0 nUR	                  US5      =n(       ah  [
        R                  " UR                  5       S[
        R                  " UR                  5       SSR                  S UR                   5       5       3nU$ SnU$ s  snf )a  Extract and format docstring information for a specific item.

Parses the estimator's docstring to retrieve documentation for a
specific parameter or attribute, formatting it as HTML-escaped text.

Parameters
----------
estimator_class : type
    The estimator class whose docstring will be parsed.

section_name : str
    The numpydoc section to search in (e.g., "Parameters", "Attributes").

item : str
    The name of the parameter or attribute to retrieve documentation for.

Returns
-------
item_description : str or None
    HTML-formatted docstring to be used as a tooltip. Returns None if the
    estimator has no docstring or if the item is not found in the
    specified section.
Nz: z<br><br>z<br>c              3   N   #    U  H  n[         R                  " U5      v   M     g 7fr   )htmlescape).0lines     r   	<genexpr> get_docstring.<locals>.<genexpr>N   s     L9K4;;t,,9Ks   #%)
inspectgetdocr   namegetr   r    typejoindesc)	r   section_nameitemestimator_class_docsstructured_docstringitem_docstringdocstring_mapitem_numpydocitem_descriptions	            r   get_docstringr4   (   s    0 #>>/: :;O PPP #7"D
"D /"D 	 

 %))$55}5{{=--./r{{=--./x{{L9K9KLLMO 	   
s   C)r   r%   r   	functoolsr   urllib.parser   sklearn.externals._numpydocr   r   r   r4    r   r   <module>r9      s7      	   11, / /*r   