def fill_disk(state, disk_size):
    """Fill disk_size disk with sequence based on the initial state.

    Repeats until state is longer than disk_size:
    - Call the data you have at this point "a".
    - Make a copy of "a"; call this copy "b".
    - Reverse the order of the characters in "b".
    - In "b", replace all instances of 0 with 1 and all 1s with 0.
    - The resulting data is "a", then a single 0, then "b".
    """
    while len(state) < disk_size:
        a = state
        b = ''.join('1' if char == '0' else '0' for char in a[::-1])
        state = f'{a}0{b}'
    return state[:disk_size]