def METHOD_NAME(input_headers: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
    # Define the custom alphabet for weights
    custom_weights = "-!#$%&*.^_|~+\"\'(),/`~0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]abcdefghijklmnopqrstuvwxyz{}"
    # Build dict of tuples and list of keys
    header_dict = dict()
    header_keys = []
    for k, v in input_headers:
        header_dict[k] = v
        header_keys.append(k)
    # Sort according to custom defined weights
    try:
        header_keys = sorted(header_keys, key=lambda word: [custom_weights.index(c) for c in word])
    except ValueError:
        raise ValueError("Illegal character encountered when sorting headers.")
    # Build list of sorted tuples
    sorted_headers = []
    for key in header_keys:
        sorted_headers.append((key, header_dict.get(key)))
    return sorted_headers