code: def increase_writes_in_percent(
          current_provisioning, percent, max_provisioned_writes,
          consumed_write_units_percent, log_tag):
      
      current_provisioning = float(current_provisioning)
      consumed_write_units_percent = float(consumed_write_units_percent)
      percent = float(percent)
      consumption_based_current_provisioning = \
          int(math.ceil(current_provisioning*(consumed_write_units_percent/100)))
  
      if consumption_based_current_provisioning > current_provisioning:
          increase = int(
              math.ceil(consumption_based_current_provisioning*(percent/100)))
          updated_provisioning = consumption_based_current_provisioning + increase
      else:
          increase = int(math.ceil(current_provisioning*(float(percent)/100)))
          updated_provisioning = current_provisioning + increase
  
      if max_provisioned_writes > 0:
          if updated_provisioning > max_provisioned_writes:
  
              logger.info(
                  '{0} - Reached provisioned writes max limit: {1}'.format(
                      log_tag,
                      max_provisioned_writes))
  
              return max_provisioned_writes
  
      logger.debug(
          '{0} - Write provisioning will be increased to {1:d} units'.format(
              log_tag,
              int(updated_provisioning)))
  
      return updated_provisioning
docs: Increase the current_provisioning with percent %
  
      :type current_provisioning: int
      :param current_provisioning: The current provisioning
      :type percent: int
      :param percent: How many percent should we increase with
      :returns: int -- New provisioning value
      :type max_provisioned_writes: int
      :param max_provisioned_writes: Configured max provisioned writes
      :type consumed_write_units_percent: float
      :param consumed_write_units_percent: Number of consumed write units
      :type log_tag: str
      :param log_tag: Prefix for the log