docs: def _transition(self, duration, brightness):
          """ Complete a transition.
  
          :param duration: Duration of transition.
          :param brightness: Transition to this brightness.
          """
          # Set initial value.
          b_start = self.brightness
          # Compute ideal step amount.
          b_steps = 0
          if brightness is not None:
              b_steps = steps(self.brightness, brightness,
                              self.command_set.brightness_steps)
          # Compute ideal step amount (at least one).
          # Calculate wait.
          wait = self._wait(duration, b_steps, b_steps)
          # Scale down steps if no wait time.
          if wait == 0:
              b_steps = self._scale_steps(duration, b_steps,
                                                   b_steps)
          # Perform transition.
          for i in range(b_steps):
              # Brightness.
              if b_steps > 0:
                  self.brightness = util.transition(i, b_steps,
                                                    b_start, brightness)
              time.sleep(wait)