def METHOD_NAME(self) -> 'Viewport':
    """Returns the :class:`~klampt.robotsim.Viewport` instance associated
    with the current GL view.  Used for interfacing with C++ widgets.
    """
    if self.view is None:
        raise RuntimeError("Can't get viewport for a GLPluginInterface that's not bound to a GLProgram")
    return self.view.to_viewport()