def get_class_instance_from_frame(frame):
    """
    Retrieves the class instance from the specified frame.

    :param frame: the frame to check
    :return: the class instance from the specified frame
    """
    return frame.f_locals.get("self", None)