def METHOD_NAME(self, task):
    dt = base.clock.dt
    if not self.gamepad:
        return task.cont
    strafe_speed = 85
    vert_speed = 50
    turn_speed = 100
    # If the left stick is pressed, we will go faster.
    lstick = self.gamepad.findButton("lstick")
    if lstick.pressed:
        strafe_speed *= 2.0
    # we will use the first found gamepad
    # Move the camera left/right
    strafe = Vec3(0)
    left_x = self.gamepad.findAxis(InputDevice.Axis.left_x)
    left_y = self.gamepad.findAxis(InputDevice.Axis.left_y)
    strafe.x = left_x.value
    strafe.y = left_y.value
    # Apply some deadzone, since the sticks don't center exactly at 0
    if strafe.lengthSquared() >= 0.01:
        self.camera.setPos(self.camera, strafe * strafe_speed * dt)
    # Use the triggers for the vertical position.
    trigger_l = self.gamepad.findAxis(InputDevice.Axis.left_trigger)
    trigger_r = self.gamepad.findAxis(InputDevice.Axis.right_trigger)
    lift = trigger_r.value - trigger_l.value
    self.camera.setZ(self.camera.getZ() + (lift * vert_speed * dt))
    # Move the camera forward/backward
    right_x = self.gamepad.findAxis(InputDevice.Axis.right_x)
    right_y = self.gamepad.findAxis(InputDevice.Axis.right_y)
    # Again, some deadzone
    if abs(right_x.value) >= 0.1 or abs(right_y.value) >= 0.1:
        self.camera.setH(self.camera, turn_speed * dt * -right_x.value)
        self.camera.setP(self.camera, turn_speed * dt * right_y.value)
        # Reset the roll so that the camera remains upright.
        self.camera.setR(0)
    return task.cont