docs: def __check_gsi_rules(configuration):
      """ Do some basic checks on the configuration """
      for table_name in configuration['tables']:
          if 'gsis' not in configuration['tables'][table_name]:
              continue
  
          for gsi_name in configuration['tables'][table_name]['gsis']:
              gsi = configuration['tables'][table_name]['gsis'][gsi_name]
              # Check that increase/decrease units is OK
              valid_units = ['percent', 'units']
              if gsi['increase_reads_unit'] not in valid_units:
                  print(
                      'increase-reads-unit must be set to '
                      'either percent or units')
                  sys.exit(1)
              if gsi['decrease_reads_unit'] not in valid_units:
                  print(
                      'decrease-reads-unit must be set to '
                      'either percent or units')
                  sys.exit(1)
              if gsi['increase_writes_unit'] not in valid_units:
                  print(
                      'increase-writes-unit must be set to '
                      'either percent or units')
                  sys.exit(1)
              if gsi['decrease_writes_unit'] not in valid_units:
                  print(
                      'decrease-writes-unit must be set to '
                      'either percent or units')
                  sys.exit(1)
              if 'increase_consumed_reads_unit' in gsi and gsi['increase_consumed_reads_unit'] and \
                      gsi['increase_consumed_reads_unit'] not in valid_units:
                  print(
                      'increase-consumed-reads-unit must be set to '
                      'either percent or units, or left unset')
                  sys.exit(1)
              if 'increase_consumed_writes_unit' in gsi and gsi['increase_consumed_writes_unit'] and \
                      gsi['increase_consumed_writes_unit'] not in valid_units:
                  print(
                      'increase-consumed-writes-unit must be set to '
                      'either percent or units, or left unset')
                  sys.exit(1)
              if ('increase_throttled_by_consumed_reads_unit' in gsi
                      and gsi['increase_throttled_by_consumed_reads_unit']
                      and gsi['increase_throttled_by_consumed_reads_unit']
                      not in valid_units):
                  print(
                      'increase-throttled-by-consumed-reads-unit must be set to '
                      'either percent or units, or left unset')
                  sys.exit(1)
              if ('increase_throttled_by_consumed_writes_unit' in gsi
                      and gsi['increase_throttled_by_consumed_writes_unit']
                      and gsi['increase_throttled_by_consumed_writes_unit']
                      not in valid_units):
                  print(
                      'increase-throttled-by-consumed-writes-unit must be set to '
                      'either percent or units, or left unset')
                  sys.exit(1)
              if ('increase_throttled_by_provisioned_reads_unit' in gsi
                      and gsi['increase_throttled_by_provisioned_reads_unit']
                      and gsi['increase_throttled_by_provisioned_reads_unit']
                      not in valid_units):
                  print(
                      'increase-throttled-by-provisioned-reads-unit must be set '
                      'to either percent or units, or left unset')
                  sys.exit(1)
              if ('increase_throttled_by_provisioned_writes_unit' in gsi
                      and gsi['increase_throttled_by_provisioned_writes_unit']
                      and gsi['increase_throttled_by_provisioned_writes_unit']
                      not in valid_units):
                  print(
                      'increase-throttled-by-provisioned-writes-unit must be set '
                      'to either percent or units, or left unset')
                  sys.exit(1)
  
              # Check lookback-window start
              if gsi['lookback_window_start'] < 1:
                  print(
                      'lookback-window-start must be a value higher than 1, '
                      'as DynamoDB sends CloudWatch data every minute')
                  sys.exit(1)
  
              # Check sns-message-types
              valid_sns_message_types = [
                  'scale-up',
                  'scale-down',
                  'high-throughput-alarm',
                  'low-throughput-alarm']
  
              if gsi['sns_message_types']:
                  for sns_type in gsi['sns_message_types']:
                      if sns_type not in valid_sns_message_types:
                          print('Warning: Invalid sns-message-type: {0}'.format(
                              sns_type))
                          gsi['sns_message_types'].remove(sns_type)
  
              # Ensure values > 1 for some important configuration options
              options = [
                  'reads_lower_threshold',
                  'reads_upper_threshold',
                  'increase_reads_with',
                  'decrease_reads_with',
                  'writes_lower_threshold',
                  'writes_upper_threshold',
                  'increase_writes_with',
                  'decrease_writes_with',
                  'min_provisioned_reads',
                  'max_provisioned_reads',
                  'min_provisioned_writes',
                  'max_provisioned_writes',
                  'increase_consumed_reads_with',
                  'increase_consumed_writes_with',
                  'decrease_consumed_reads_with',
                  'decrease_consumed_writes_with'
              ]
              # Config options without a mandatory default
              # should be allowed a None value
              non_default = [
                  'increase_consumed_reads_with',
                  'increase_consumed_writes_with',
                  'decrease_consumed_reads_with',
                  'decrease_consumed_writes_with'
              ]
  
              for option in options:
                  if (option in non_default
                          and option in gsi
                          and gsi[option]
                          and gsi[option] < 1):
                      print('{0} may not be lower than 1 for GSI {1}'.format(
                          option, gsi_name))
                      sys.exit(1)
  
                  if (option in gsi
                          and option not in non_default
                          and gsi[option] < 1):
                      print('{0} may not be lower than 1 for GSI {1}'.format(
                          option, gsi_name))
                      sys.exit(1)
  
              if (int(gsi['min_provisioned_reads']) >
                      int(gsi['max_provisioned_reads'])):
                  print(
                      'min-provisioned-reads ({0}) may not be higher than '
                      'max-provisioned-reads ({1}) for GSI {2}'.format(
                          gsi['min_provisioned_reads'],
                          gsi['max_provisioned_reads'],
                          gsi_name))
                  sys.exit(1)
              elif (int(gsi['min_provisioned_writes']) >
                      int(gsi['max_provisioned_writes'])):
                  print(
                      'min-provisioned-writes ({0}) may not be higher than '
                      'max-provisioned-writes ({1}) for GSI {2}'.format(
                          gsi['min_provisioned_writes'],
                          gsi['max_provisioned_writes'],
                          gsi_name))
                  sys.exit(1)