from typing import Sequence
from typing import Optional


def split_round_robin(values: Sequence, num_procs: Optional[int]) -> Sequence[Sequence]:
    """
    Split values into a `num_procs` sequences.

    ```python
    split_round_robin(range(10), 3) == [[0, 3, 6, 9], [1, 4, 7], [2, 5, 8]]
    ```
    """
    if num_procs is None:
        return [[vals] for vals in values]
    out = [[] for _ in range(num_procs)]
    for i, vals in enumerate(values):
        out[i % num_procs].append(vals)
    return out