
    hN                    n    S SK Jr  S SKJr  S SKJr  S SKJr  \(       a  S SK	J
r
Jr  \S.     SS jjrg)	    )annotations)TYPE_CHECKINGN)DEFAULT_QUERY_OPT_FLAGS)	LazyFrameQueryOptFlags)optimizationsc                   UR                  5       nU R                  R                  UR                  5      n[        R
                  " U5      $ )a  
Prepare the given LazyFrame for execution on Polars Cloud.

Parameters
----------
lf
    The LazyFrame to prepare.
optimizations
    Optimizations to enable or disable in the query optimizer.

Raises
------
InvalidOperationError
    If the given LazyFrame is not eligible to be run on Polars Cloud.
    The following conditions will disqualify a LazyFrame from being eligible:

    - Contains a user-defined function
    - Scans or sinks to a local filesystem
ComputeError
    If the given LazyFrame cannot be serialized.
)__copy___ldfwith_optimizations_pyoptflagsplrprepare_cloud_plan)lfr   pylfs      M/home/james-whalen/.local/lib/python3.13/site-packages/polars/_utils/cloud.pyr   r      s=    4 "**,M77%%m&?&?@D!!$''    )r   r   r   r   returnbytes)
__future__r   typingr   polars._plr_plrr   polars.lazyframe.opt_flagsr   polarsr   r   r    r   r   <module>r      s=    "    >/ $;(( !( 	(r   