def _current_class_is_component(self) -> type[Component] | None:
        """Check if the current class is a Component.

        Returns:
            Whether the current class is a Component.
        """
        if (
            self.current_class is not None
            and self.current_class in self.classes
            and issubclass((clz := self.classes[self.current_class]), Component)
        ):
            return clz
        return None
Check if the current class is a Component.

        Returns:
            Whether the current class is a Component.
        
reflex/utils/pyi_generator.py