docs: def get_consumed_write_units_percent(
          table_name, gsi_name, lookback_window_start=15, lookback_period=5):
      """ Returns the number of consumed write units in percent
  
      :type table_name: str
      :param table_name: Name of the DynamoDB table
      :type gsi_name: str
      :param gsi_name: Name of the GSI
      :type lookback_window_start: int
      :param lookback_window_start: Relative start time for the CloudWatch metric
      :type lookback_period: int
      :param lookback_period: Number of minutes to look at
      :returns: float -- Number of consumed writes as a
          percentage of provisioned writes
      """
      try:
          metrics = __get_aws_metric(
              table_name,
              gsi_name,
              lookback_window_start,
              lookback_period,
              'ConsumedWriteCapacityUnits')
      except BotoServerError:
          raise
  
      if metrics:
          lookback_seconds = lookback_period * 60
          consumed_write_units = (
              float(metrics[0]['Sum']) / float(lookback_seconds))
      else:
          consumed_write_units = 0
  
      try:
          gsi_write_units = dynamodb.get_provisioned_gsi_write_units(
              table_name, gsi_name)
  
          consumed_write_units_percent = (
              float(consumed_write_units) /
              float(gsi_write_units) * 100)
      except JSONResponseError:
          raise
  
      logger.info('{0} - GSI: {1} - Consumed write units: {2:.2f}%'.format(
          table_name, gsi_name, consumed_write_units_percent))
      return consumed_write_units_percent