o
    $i                     @   s,   d dl Z dd Zdd Zdd Zdd	 ZdS )
    Nc                 C   s$   dd }|| pt | do|| jS )z1Check if an object is a Cython function or methodc                 S   s   t | jdkS )Ncython_function_or_method)type__name__)x r   V/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/ray/_private/inspect_util.pycheck_cython   s   zis_cython.<locals>.check_cython__func__)hasattrr	   )objr   r   r   r   	is_cython   s   r   c                 C   s   t | pt | pt| S )zCheck if an object is a function or method.

    Args:
        obj: The Python object in question.

    Returns:
        True if the object is an function or method.
    )inspect
isfunctionismethodr   )r   r   r   r   is_function_or_method   s   	r   c                 C   s   t | do	| jduS )z3Returns whether the given method is a class_method.__self__N)r
   r   )fr   r   r   is_class_method    s   r   c                 C   s2   t | D ]}||jv rt|j| t  S qdS )a)  Returns whether the class has a static method with the given name.

    Args:
        cls: The Python class (i.e. object of type `type`) to
            search for the method in.
        f_name: The name of the method to look up in this class
            and check whether or not it is static.
    F)r   getmro__dict__
isinstancestaticmethod)clsf_namebase_clsr   r   r   is_static_method%   s
   	
r   )r   r   r   r   r   r   r   r   r   <module>   s
    