from typing import Sequence
from typing import Any
from typing import Callable
from typing import Tuple
from typing import List


def _split_list(
    the_sequence: Sequence[Any], predicate: Callable[[Any], Any]
) -> Tuple[List[Any], List[Any]]:
    """Split sequence s via predicate, and return pair ([true], [false]).

    The return value is a 2-tuple of lists,
    ([x for x in s if predicate(x)],
    [x for x in s if not predicate(x)])
    """

    yes = []
    # pylint: disable=invalid-name
    no = []
    for x in the_sequence:
        if predicate(x):
            yes.append(x)
        else:
            no.append(x)
    return yes, no