Repository: ManimCommunity/manim
File: manim/scene/zoomed_scene.py (Python)

Code before:

        # Position camera and display
        zoomed_camera.frame.move_to(self.zoomed_camera_frame_starting_position)
        if self.zoomed_display_center is not None:
            zoomed_display.move_to(self.zoomed_display_center)
        else:
            zoomed_display.to_corner(
                self.zoomed_display_corner,
                buff=self.zoomed_display_corner_buff,
            )

        self.zoomed_camera = zoomed_camera
        self.zoomed_display = zoomed_display

    def activate_zooming(self, animate: bool = False) -> None:
        """This method is used to activate the zooming for the zoomed_camera.

        Parameters
        ----------
        animate
            Whether or not to animate the activation
            of the zoomed camera.
        """
        self.zoom_activated = True
        self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display)  # type: ignore[union-attr]
        if animate:
            self.play(self.get_zoom_in_animation())
            self.play(self.get_zoomed_display_pop_out_animation())
        self.add_foreground_mobjects(
            self.zoomed_camera.frame,
            self.zoomed_display,
        )

    def get_zoom_in_animation(self, run_time: float = 2, **kwargs: Any) -> ApplyMethod:
        """Returns the animation of camera zooming in.

        Parameters
        ----------
        run_time
            The run_time of the animation of the camera zooming in.
        **kwargs
            Any valid keyword arguments of ApplyMethod()

        Returns
        -------
        ApplyMethod
            The animation of the camera zooming in.
        """
        frame = self.zoomed_camera.frame
        if isinstance(self.camera, MovingCamera):
            # OpenGLCamera does not have frame_height and frame_width attributes

Review comment (suggestion):
Had to use type ignore here, since `add_image_mobject_from_camera`  does not exist for `OpenGLCamera`. 

Code after:
        zoomed_camera.frame.scale(self.zoom_factor)

        # Position camera and display
        zoomed_camera.frame.move_to(self.zoomed_camera_frame_starting_position)
        if self.zoomed_display_center is not None:
            zoomed_display.move_to(self.zoomed_display_center)
        else:
            zoomed_display.to_corner(
                self.zoomed_display_corner,
                buff=self.zoomed_display_corner_buff,
            )

        self.zoomed_camera = zoomed_camera
        self.zoomed_display = zoomed_display

    def activate_zooming(self, animate: bool = False) -> None:
        """This method is used to activate the zooming for the zoomed_camera.

        Parameters
        ----------
        animate
            Whether or not to animate the activation
            of the zoomed camera.
        """
        self.zoom_activated = True
        self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display)  # type: ignore[union-attr]
        if animate:
            self.play(self.get_zoom_in_animation())
            self.play(self.get_zoomed_display_pop_out_animation())
        self.add_foreground_mobjects(
            self.zoomed_camera.frame,
            self.zoomed_display,
        )

    def get_zoom_in_animation(self, run_time: float = 2, **kwargs: Any) -> ApplyMethod:
        """Returns the animation of camera zooming in.

        Parameters
        ----------
        run_time
            The run_time of the animation of the camera zooming in.
        **kwargs
            Any valid keyword arguments of ApplyMethod()

        Returns
        -------
        ApplyMethod
            The animation of the camera zooming in.
        """
        frame = self.zoomed_camera.frame
        if isinstance(self.camera, OpenGLCamera):