def METHOD_NAME(self, amount):
    """
    Performs sanity checks and update the current amount.
    """
    if amount < self.minimum:
        amount = self.minimum
    if amount > self.maximum:
        amount = self.maximum
    self.current_amount = amount
    self._update_progress_bar()
    self.draw()