def _validate(self, direction: str):
    if (direction == 'forward'):
        self.validate_on_forward()
    elif (direction == 'backward'):
        self.validate_on_backward()
    elif direction.startswith('jump'):
        self.validate_on_jump()
def _validate(self, direction: str):
    if (direction == 'forward'):
        self.validate_on_forward()
    elif (direction == 'backward'):
        self.validate_on_backward()
    elif direction.startswith('jump'):
        self.validate_on_jump()