<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers):
 """ Pan or rotate the view. """

        self.view['ball'].drag(np.array([x, y]))
        self.scene.camera.transform = self.view['ball'].pose