def split_children(ast_node, ast_type):
    """Sorts the children of `ast_node` into two lists, based on their type.
    
    *Parameters*:
     * `ast_node`: the AST node whose children should be sorted
     * `ast_type`: the type all children in the first list should have.
     
    *Return Value*:
    A tuple `(a, b)` of lists, `a` contains all child nodes with type `ast_type`, `b` the rest.
    """
    match, nomatch = [], []
    for node in ast_node:
        if node.TYPE is ast_type:
            match.append(node)
        else:
            nomatch.append(node)
    return match, nomatch