L if4ddlmZddlmZddZddZd dZy) ) annotations)warncpddl}ddlm}ddl}t ||j j }|j}d} |re|j|}|j|s*t|jddx}r#|jdr|j}|dz }n ~|S|re ~|S#~wxYw)zFind the first place in the stack that is not inside narwhals. Taken from: https://github.com/pandas-dev/pandas/blob/ab89c53f48df67709a533b6a95ce3d911871a0a8/pandas/util/_exceptions.py#L30-L51 rN)Path co_qualnamezsingledispatch.) inspectpathlibrnarwhalsstr__file__parent currentframegetfile startswithgetattrf_codef_back)r rnwpkg_dirframenfnamequalnames Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/narwhals/_exceptions.pyfind_stacklevelrs $r{{#**+G  "E AOOE*E($U\\=$GGG''(9: Q  H'   H sA B2+B22B5c8t|tty)zIssue a deprecation warning. Arguments: message: The message associated with the warning. _version: Narwhals version when the warning was introduced. Just used for internal bookkeeping. messagecategory stacklevelN)rDeprecationWarningr)r_versions rissue_deprecation_warningr$-s #5/BSTc0t||ty)Nr)rr)rr s r issue_warningr'8s88IJr%N)returnint)rr r#r r(None)rr r z type[Warning]r(r*) __future__rwarningsrrr$r'r%rr.s"$ NUKr%