nodes: 0, module; 1, function_definition; 2, function_name:sort_genomic_ranges; 3, parameters; 4, block; 5, identifier:rngs; 6, expression_statement; 7, return_statement; 8, comment:"""sort multiple ranges"""; 9, call; 10, identifier:sorted; 11, argument_list; 12, identifier:rngs; 13, keyword_argument; 14, identifier:key; 15, lambda; 16, lambda_parameters; 17, tuple; 18, identifier:x; 19, attribute; 20, attribute; 21, attribute; 22, identifier:x; 23, identifier:chr; 24, identifier:x; 25, identifier:start; 26, identifier:x; 27, identifier:end
code: def sort_genomic_ranges(rngs):
    """sort multiple ranges"""
    return sorted(rngs, key=lambda x: (x.chr, x.start, x.end))