nodes: 0, module; 1, function_definition; 2, function_name:sort_members; 3, parameters; 4, block; 5, identifier:tup; 6, identifier:names; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, comment:"""Return two pairs of members, scalar and tuple members.
  
    The scalars will be sorted s.t. the unbound members are at the top.
    """; 12, assignment; 13, assignment; 14, expression_list; 15, pattern_list; 16, call; 17, pattern_list; 18, call; 19, binary_operator:usorted(unbound) + usorted(bound); 20, call; 21, identifier:scalars; 22, identifier:tuples; 23, identifier:partition; 24, argument_list; 25, identifier:unbound; 26, identifier:bound; 27, identifier:partition; 28, argument_list; 29, call; 30, call; 31, identifier:usorted; 32, argument_list; 33, lambda; 34, identifier:names; 35, lambda; 36, identifier:scalars; 37, identifier:usorted; 38, argument_list; 39, identifier:usorted; 40, argument_list; 41, identifier:tuples; 42, lambda_parameters; 43, not_operator; 44, lambda_parameters; 45, call; 46, identifier:unbound; 47, identifier:bound; 48, identifier:x; 49, call; 50, identifier:x; 51, attribute; 52, argument_list; 53, identifier:is_tuple_node; 54, argument_list; 55, attribute; 56, identifier:is_unbound; 57, attribute; 58, subscript; 59, identifier:value; 60, subscript; 61, identifier:value; 62, attribute; 63, identifier:x; 64, attribute; 65, identifier:x; 66, identifier:tup; 67, identifier:member; 68, identifier:tup; 69, identifier:member
code: def sort_members(tup, names):
    """Return two pairs of members, scalar and tuple members.
  
    The scalars will be sorted s.t. the unbound members are at the top.
    """
    scalars, tuples = partition(lambda x: not is_tuple_node(tup.member[x].value), names)
    unbound, bound = partition(lambda x: tup.member[x].value.is_unbound(), scalars)
    return usorted(unbound) + usorted(bound), usorted(tuples)