whole_func_string: function checkFlags(flags) {
    const seen = new Set();
  
    for (const flag of flags) {
      if (seen.has(flag) || !validFlags.includes(flag)) {
        throw new SyntaxError(`Invalid flags: ${flags}`);
      }
      seen.add(flag);
    }
  
    return flags.split('').sort().join('');
  }
func_code_string: function checkFlags(flags) {
    const seen = new Set();
  
    for (const flag of flags) {
      if (seen.has(flag) || !validFlags.includes(flag)) {
        throw new SyntaxError(`Invalid flags: ${flags}`);
      }
      seen.add(flag);
    }
  
    return flags.split('').sort().join('');
  }
func_documentation_string: Checks the flags are valid, and that
  we don't duplicate flags.