docs: def ensure_provisioning(
          table_name, table_key, gsi_name, gsi_key,
          num_consec_read_checks, num_consec_write_checks):
      """ Ensure that provisioning is correct for Global Secondary Indexes
  
      :type table_name: str
      :param table_name: Name of the DynamoDB table
      :type table_key: str
      :param table_key: Table configuration option key name
      :type gsi_name: str
      :param gsi_name: Name of the GSI
      :type gsi_key: str
      :param gsi_key: GSI configuration option key name
      :type num_consec_read_checks: int
      :param num_consec_read_checks: How many consecutive checks have we had
      :type num_consec_write_checks: int
      :param num_consec_write_checks: How many consecutive checks have we had
      :returns: (int, int) -- num_consec_read_checks, num_consec_write_checks
      """
      if get_global_option('circuit_breaker_url') or get_gsi_option(
              table_key, gsi_key, 'circuit_breaker_url'):
          if circuit_breaker.is_open(table_name, table_key, gsi_name, gsi_key):
              logger.warning('Circuit breaker is OPEN!')
              return (0, 0)
  
      logger.info(
          '{0} - Will ensure provisioning for global secondary index {1}'.format(
              table_name, gsi_name))
  
      # Handle throughput alarm checks
      __ensure_provisioning_alarm(table_name, table_key, gsi_name, gsi_key)
  
      try:
          read_update_needed, updated_read_units, num_consec_read_checks = \
              __ensure_provisioning_reads(
                  table_name,
                  table_key,
                  gsi_name,
                  gsi_key,
                  num_consec_read_checks)
          write_update_needed, updated_write_units, num_consec_write_checks = \
              __ensure_provisioning_writes(
                  table_name,
                  table_key,
                  gsi_name,
                  gsi_key,
                  num_consec_write_checks)
  
          if read_update_needed:
              num_consec_read_checks = 0
  
          if write_update_needed:
              num_consec_write_checks = 0
  
          # Handle throughput updates
          if read_update_needed or write_update_needed:
              logger.info(
                  '{0} - GSI: {1} - Changing provisioning to {2:d} '
                  'read units and {3:d} write units'.format(
                      table_name,
                      gsi_name,
                      int(updated_read_units),
                      int(updated_write_units)))
              __update_throughput(
                  table_name,
                  table_key,
                  gsi_name,
                  gsi_key,
                  updated_read_units,
                  updated_write_units)
          else:
              logger.info(
                  '{0} - GSI: {1} - No need to change provisioning'.format(
                      table_name,
                      gsi_name))
      except JSONResponseError:
          raise
      except BotoServerError:
          raise
  
      return num_consec_read_checks, num_consec_write_checks