def split_pair(pair_string, separator, nullable_idx=<NUM_LIT:1>):
pair = pair_string.split(separator, <NUM_LIT:1>)<EOL>if len(pair) == <NUM_LIT:1>:<EOL><INDENT>if nullable_idx == <NUM_LIT:0>:<EOL><INDENT>return [None, pair[<NUM_LIT:0>]]<EOL><DEDENT>elif nullable_idx == <NUM_LIT:1>:<EOL><INDENT>return [pair[<NUM_LIT:0>], None]<EOL><DEDENT>else:<EOL><INDENT>raise IndexError('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return pair<EOL><DEDENT>
Split a string into a pair, which can have one empty value.

    Args:
      pair_string: The string to be split.
      separator: The separator to be used for splitting.
      nullable_idx: The location to be set to null if the separator is not in the
                    input string. Should be either 0 or 1.

    Returns:
      A list containing the pair.

    Raises:
      IndexError: If nullable_idx is not 0 or 1.