code: def set_to_tuple(tokens):
      
      internal_assert(len(tokens) == 1, "invalid set maker tokens", tokens)
      if "comp" in tokens or "list" in tokens:
          return "(" + tokens[0] + ")"
      elif "test" in tokens:
          return "(" + tokens[0] + ",)"
      else:
          raise CoconutInternalException("invalid set maker item", tokens[0])
docs: Converts set literal tokens to tuples.