docs: def get_tables_and_gsis():
      """ Get a set of tables and gsis and their configuration keys
  
      :returns: set -- A set of tuples (table_name, table_conf_key)
      """
      table_names = set()
      configured_tables = get_configured_tables()
      not_used_tables = set(configured_tables)
  
      # Add regexp table names
      for table_instance in list_tables():
          for key_name in configured_tables:
              try:
                  if re.match(key_name, table_instance.table_name):
                      logger.debug("Table {0} match with config key {1}".format(
                          table_instance.table_name, key_name))
  
                      # Notify users about regexps that match multiple tables
                      if table_instance.table_name in [x[0] for x in table_names]:
                          logger.warning(
                              'Table {0} matches more than one regexp in config, '
                              'skipping this match: "{1}"'.format(
                                  table_instance.table_name, key_name))
                      else:
                          table_names.add(
                              (
                                  table_instance.table_name,
                                  key_name
                              ))
                          not_used_tables.discard(key_name)
                  else:
                      logger.debug(
                          "Table {0} did not match with config key {1}".format(
                              table_instance.table_name, key_name))
              except re.error:
                  logger.error('Invalid regular expression: "{0}"'.format(
                      key_name))
                  sys.exit(1)
  
      if not_used_tables:
          logger.warning(
              'No tables matching the following configured '
              'tables found: {0}'.format(', '.join(not_used_tables)))
  
      return sorted(table_names)