docs: def get_provisioned_gsi_write_units(table_name, gsi_name):
      """ Returns the number of provisioned write units for the table
  
      :type table_name: str
      :param table_name: Name of the DynamoDB table
      :type gsi_name: str
      :param gsi_name: Name of the GSI
      :returns: int -- Number of write units
      """
      try:
          desc = DYNAMODB_CONNECTION.describe_table(table_name)
      except JSONResponseError:
          raise
  
      for gsi in desc[u'Table'][u'GlobalSecondaryIndexes']:
          if gsi[u'IndexName'] == gsi_name:
              write_units = int(
                  gsi[u'ProvisionedThroughput'][u'WriteCapacityUnits'])
              break
  
      logger.debug(
          '{0} - GSI: {1} - Currently provisioned write units: {2:d}'.format(
              table_name, gsi_name, write_units))
      return write_units