sequence
stringlengths 1.37k
35.1k
| docstring
stringlengths 17
102
|
---|---|
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'redo'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'list_splat_pattern', 'children': ['6']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '7', 'type': 'block', 'children': ['8', '15', '27', '35', '43', '54', '67', '73', '99', '321', '330', '337']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '13']}; {'id': '9', 'type': 'not_operator', 'children': ['10']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'gui_up'}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'return_statement', 'children': []}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'mod_only'}; {'id': '18', 'type': 'call', 'children': ['19', '26']}; {'id': '19', 'type': 'attribute', 'children': ['20', '25']}; {'id': '20', 'type': 'attribute', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'w'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'modified_only'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'get_state'}; {'id': '26', 'type': 'argument_list', 'children': []}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'Bunch'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'caselessDict'}; {'id': '34', 'type': 'argument_list', 'children': []}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '42']}; {'id': '37', 'type': 'attribute', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'treeview'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'clear'}; {'id': '42', 'type': 'argument_list', 'children': []}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'call', 'children': ['45', '52']}; {'id': '45', 'type': 'attribute', 'children': ['46', '51']}; {'id': '46', 'type': 'attribute', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'w'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'set_text'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'string', 'children': [], 'value': "''"}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'assignment', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'channel'}; {'id': '57', 'type': 'call', 'children': ['58', '63']}; {'id': '58', 'type': 'attribute', 'children': ['59', '62']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'fv'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'get_channel'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'chname'}; {'id': '67', 'type': 'if_statement', 'children': ['68', '71']}; {'id': '68', 'type': 'comparison_operator', 'children': ['69', '70'], 'value': 'is'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'channel'}; {'id': '70', 'type': 'None', 'children': []}; {'id': '71', 'type': 'block', 'children': ['72']}; {'id': '72', 'type': 'return_statement', 'children': []}; {'id': '73', 'type': 'if_statement', 'children': ['74', '75', '89']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'mod_only'}; {'id': '75', 'type': 'block', 'children': ['76']}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'all_keys'}; {'id': '79', 'type': 'call', 'children': ['80', '85']}; {'id': '80', 'type': 'attribute', 'children': ['81', '84']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'channel'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'datasrc'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'keyword_argument', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '88', 'type': 'string', 'children': [], 'value': "'alpha'"}; {'id': '89', 'type': 'else_clause', 'children': ['90']}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'all_keys'}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'channel'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'get_image_names'}; {'id': '98', 'type': 'argument_list', 'children': []}; {'id': '99', 'type': 'for_statement', 'children': ['100', '101', '102']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'all_keys'}; {'id': '102', 'type': 'block', 'children': ['103', '112', '121', '130', '139', '199', '204', '212']}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'iminfo'}; {'id': '106', 'type': 'call', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'channel'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'get_image_info'}; {'id': '110', 'type': 'argument_list', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '112', 'type': 'expression_statement', 'children': ['113']}; {'id': '113', 'type': 'assignment', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'iminfo'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'string', 'children': [], 'value': "'path'"}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'iminfo'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'string', 'children': [], 'value': "'idx'"}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '133', 'type': 'call', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'iminfo'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'string', 'children': [], 'value': "'time_modified'"}; {'id': '139', 'type': 'if_statement', 'children': ['140', '143', '152']}; {'id': '140', 'type': 'comparison_operator', 'children': ['141', '142'], 'value': 'is'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '142', 'type': 'None', 'children': []}; {'id': '143', 'type': 'block', 'children': ['144', '148']}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'assignment', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'is_fits'}; {'id': '151', 'type': 'True', 'children': []}; {'id': '152', 'type': 'else_clause', 'children': ['153']}; {'id': '153', 'type': 'block', 'children': ['154', '165', '178', '186', '190']}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '157', 'type': 'call', 'children': ['158', '163']}; {'id': '158', 'type': 'attribute', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'basename'}; {'id': '163', 'type': 'argument_list', 'children': ['164']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '165', 'type': 'expression_statement', 'children': ['166']}; {'id': '166', 'type': 'assignment', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'infile_ext'}; {'id': '168', 'type': 'subscript', 'children': ['169', '177']}; {'id': '169', 'type': 'call', 'children': ['170', '175']}; {'id': '170', 'type': 'attribute', 'children': ['171', '174']}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'splitext'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '177', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'assignment', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'infile_ext'}; {'id': '181', 'type': 'call', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'infile_ext'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '185', 'type': 'argument_list', 'children': []}; {'id': '186', 'type': 'expression_statement', 'children': ['187']}; {'id': '187', 'type': 'assignment', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'is_fits'}; {'id': '189', 'type': 'False', 'children': []}; {'id': '190', 'type': 'if_statement', 'children': ['191', '194']}; {'id': '191', 'type': 'comparison_operator', 'children': ['192', '193'], 'value': 'in'}; {'id': '192', 'type': 'string', 'children': [], 'value': "'fit'"}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'infile_ext'}; {'id': '194', 'type': 'block', 'children': ['195']}; {'id': '195', 'type': 'expression_statement', 'children': ['196']}; {'id': '196', 'type': 'assignment', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'is_fits'}; {'id': '198', 'type': 'True', 'children': []}; {'id': '199', 'type': 'if_statement', 'children': ['200', '202']}; {'id': '200', 'type': 'not_operator', 'children': ['201']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'is_fits'}; {'id': '202', 'type': 'block', 'children': ['203']}; {'id': '203', 'type': 'continue_statement', 'children': []}; {'id': '204', 'type': 'if_statement', 'children': ['205', '210']}; {'id': '205', 'type': 'boolean_operator', 'children': ['206', '207'], 'value': 'and'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'mod_only'}; {'id': '207', 'type': 'comparison_operator', 'children': ['208', '209'], 'value': 'is'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '209', 'type': 'None', 'children': []}; {'id': '210', 'type': 'block', 'children': ['211']}; {'id': '211', 'type': 'continue_statement', 'children': []}; {'id': '212', 'type': 'if_statement', 'children': ['213', '216', '263']}; {'id': '213', 'type': 'comparison_operator', 'children': ['214', '215'], 'value': 'in'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '216', 'type': 'block', 'children': ['217']}; {'id': '217', 'type': 'if_statement', 'children': ['218', '221']}; {'id': '218', 'type': 'comparison_operator', 'children': ['219', '220'], 'value': 'is'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '220', 'type': 'None', 'children': []}; {'id': '221', 'type': 'block', 'children': ['222', '233', '244']}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'call', 'children': ['224', '231']}; {'id': '224', 'type': 'attribute', 'children': ['225', '230']}; {'id': '225', 'type': 'attribute', 'children': ['226', '229']}; {'id': '226', 'type': 'subscript', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '231', 'type': 'argument_list', 'children': ['232']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'elist'}; {'id': '236', 'type': 'call', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '238', 'type': 'argument_list', 'children': ['239']}; {'id': '239', 'type': 'attribute', 'children': ['240', '243']}; {'id': '240', 'type': 'subscript', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '244', 'type': 'expression_statement', 'children': ['245']}; {'id': '245', 'type': 'assignment', 'children': ['246', '251']}; {'id': '246', 'type': 'attribute', 'children': ['247', '250']}; {'id': '247', 'type': 'subscript', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'MODEXT'}; {'id': '251', 'type': 'call', 'children': ['252', '255']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '255', 'type': 'argument_list', 'children': ['256']}; {'id': '256', 'type': 'call', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'map'}; {'id': '258', 'type': 'argument_list', 'children': ['259', '262']}; {'id': '259', 'type': 'attribute', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': '_format_extname'}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'elist'}; {'id': '263', 'type': 'else_clause', 'children': ['264']}; {'id': '264', 'type': 'block', 'children': ['265', '299']}; {'id': '265', 'type': 'if_statement', 'children': ['266', '269', '280']}; {'id': '266', 'type': 'comparison_operator', 'children': ['267', '268'], 'value': 'is'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '268', 'type': 'None', 'children': []}; {'id': '269', 'type': 'block', 'children': ['270', '274']}; {'id': '270', 'type': 'expression_statement', 'children': ['271']}; {'id': '271', 'type': 'assignment', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '273', 'type': 'string', 'children': [], 'value': "''"}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'assignment', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '277', 'type': 'call', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '279', 'type': 'argument_list', 'children': []}; {'id': '280', 'type': 'else_clause', 'children': ['281']}; {'id': '281', 'type': 'block', 'children': ['282', '291']}; {'id': '282', 'type': 'expression_statement', 'children': ['283']}; {'id': '283', 'type': 'assignment', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '285', 'type': 'call', 'children': ['286', '289']}; {'id': '286', 'type': 'attribute', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': '_format_extname'}; {'id': '289', 'type': 'argument_list', 'children': ['290']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '291', 'type': 'expression_statement', 'children': ['292']}; {'id': '292', 'type': 'assignment', 'children': ['293', '294']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '294', 'type': 'call', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '296', 'type': 'argument_list', 'children': ['297']}; {'id': '297', 'type': 'list', 'children': ['298'], 'value': '[idx]'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '299', 'type': 'expression_statement', 'children': ['300']}; {'id': '300', 'type': 'assignment', 'children': ['301', '304']}; {'id': '301', 'type': 'subscript', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '304', 'type': 'call', 'children': ['305', '308']}; {'id': '305', 'type': 'attribute', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'Bunch'}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'Bunch'}; {'id': '308', 'type': 'argument_list', 'children': ['309', '312', '315', '318']}; {'id': '309', 'type': 'keyword_argument', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'IMAGE'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'infile'}; {'id': '312', 'type': 'keyword_argument', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'MODEXT'}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '315', 'type': 'keyword_argument', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'extlist'}; {'id': '318', 'type': 'keyword_argument', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '321', 'type': 'expression_statement', 'children': ['322']}; {'id': '322', 'type': 'call', 'children': ['323', '328']}; {'id': '323', 'type': 'attribute', 'children': ['324', '327']}; {'id': '324', 'type': 'attribute', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'treeview'}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'set_tree'}; {'id': '328', 'type': 'argument_list', 'children': ['329']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '330', 'type': 'expression_statement', 'children': ['331']}; {'id': '331', 'type': 'assignment', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'n_rows'}; {'id': '333', 'type': 'call', 'children': ['334', '335']}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '335', 'type': 'argument_list', 'children': ['336']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'treedict'}; {'id': '337', 'type': 'if_statement', 'children': ['338', '341', '353']}; {'id': '338', 'type': 'comparison_operator', 'children': ['339', '340'], 'value': '=='}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'n_rows'}; {'id': '340', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '341', 'type': 'block', 'children': ['342']}; {'id': '342', 'type': 'expression_statement', 'children': ['343']}; {'id': '343', 'type': 'call', 'children': ['344', '351']}; {'id': '344', 'type': 'attribute', 'children': ['345', '350']}; {'id': '345', 'type': 'attribute', 'children': ['346', '349']}; {'id': '346', 'type': 'attribute', 'children': ['347', '348']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'w'}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'set_text'}; {'id': '351', 'type': 'argument_list', 'children': ['352']}; {'id': '352', 'type': 'string', 'children': [], 'value': "'Nothing available for saving'"}; {'id': '353', 'type': 'elif_clause', 'children': ['354', '365']}; {'id': '354', 'type': 'comparison_operator', 'children': ['355', '356'], 'value': '<'}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'n_rows'}; {'id': '356', 'type': 'call', 'children': ['357', '362']}; {'id': '357', 'type': 'attribute', 'children': ['358', '361']}; {'id': '358', 'type': 'attribute', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'settings'}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '362', 'type': 'argument_list', 'children': ['363', '364']}; {'id': '363', 'type': 'string', 'children': [], 'value': "'max_rows_for_col_resize'"}; {'id': '364', 'type': 'integer', 'children': [], 'value': '5000'}; {'id': '365', 'type': 'block', 'children': ['366', '374']}; {'id': '366', 'type': 'expression_statement', 'children': ['367']}; {'id': '367', 'type': 'call', 'children': ['368', '373']}; {'id': '368', 'type': 'attribute', 'children': ['369', '372']}; {'id': '369', 'type': 'attribute', 'children': ['370', '371']}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'treeview'}; {'id': '372', 'type': 'identifier', 'children': [], 'value': 'set_optimal_column_widths'}; {'id': '373', 'type': 'argument_list', 'children': []}; {'id': '374', 'type': 'expression_statement', 'children': ['375']}; {'id': '375', 'type': 'call', 'children': ['376', '381']}; {'id': '376', 'type': 'attribute', 'children': ['377', '380']}; {'id': '377', 'type': 'attribute', 'children': ['378', '379']}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '379', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '380', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '381', 'type': 'argument_list', 'children': ['382']}; {'id': '382', 'type': 'call', 'children': ['383', '386']}; {'id': '383', 'type': 'attribute', 'children': ['384', '385']}; {'id': '384', 'type': 'string', 'children': [], 'value': "'Resized columns for {0} row(s)'"}; {'id': '385', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '386', 'type': 'argument_list', 'children': ['387']}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'n_rows'} | Generate listing of images that user can save. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_do_info'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '6', 'type': 'block', 'children': ['7', '43', '58', '64', '76', '86', '97', '119', '136']}; {'id': '7', 'type': 'function_definition', 'children': ['8', '9', '11']}; {'id': '8', 'type': 'function_name', 'children': [], 'value': '_filter_components'}; {'id': '9', 'type': 'parameters', 'children': ['10']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'compdetails'}; {'id': '11', 'type': 'block', 'children': ['12', '16', '41']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '15', 'type': 'dictionary', 'children': []}; {'id': '16', 'type': 'for_statement', 'children': ['17', '20', '25']}; {'id': '17', 'type': 'pattern_list', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'compdetails'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '24', 'type': 'argument_list', 'children': []}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'if_statement', 'children': ['27', '34']}; {'id': '27', 'type': 'call', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '33']}; {'id': '32', 'type': 'string', 'children': [], 'value': '"is_active"'}; {'id': '33', 'type': 'True', 'children': []}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '40']}; {'id': '37', 'type': 'subscript', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '41', 'type': 'return_statement', 'children': ['42']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '46', 'type': '()', 'children': ['47']}; {'id': '47', 'type': 'boolean_operator', 'children': ['48', '55'], 'value': 'or'}; {'id': '48', 'type': 'boolean_operator', 'children': ['49', '52'], 'value': 'or'}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'components'}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'component_owners'}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '61', 'type': 'list', 'children': ['62', '63'], 'value': '["name", "id"]'}; {'id': '62', 'type': 'string', 'children': [], 'value': '"name"'}; {'id': '63', 'type': 'string', 'children': [], 'value': '"id"'}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'fastcomponents'}; {'id': '67', 'type': '()', 'children': ['68']}; {'id': '68', 'type': 'boolean_operator', 'children': ['69', '72'], 'value': 'and'}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'components'}; {'id': '72', 'type': 'not_operator', 'children': ['73']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'active_components'}; {'id': '76', 'type': 'if_statement', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '80', 'type': 'block', 'children': ['81']}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'augmented_assignment', 'children': ['83', '84'], 'value': '+='}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '84', 'type': 'list', 'children': ['85'], 'value': '["versions"]'}; {'id': '85', 'type': 'string', 'children': [], 'value': '"versions"'}; {'id': '86', 'type': 'if_statement', 'children': ['87', '90']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'component_owners'}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'augmented_assignment', 'children': ['93', '94'], 'value': '+='}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '94', 'type': 'list', 'children': ['95', '96'], 'value': '[\n "components.default_assigned_to",\n "components.name",\n ]'}; {'id': '95', 'type': 'string', 'children': [], 'value': '"components.default_assigned_to"'}; {'id': '96', 'type': 'string', 'children': [], 'value': '"components.name"'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '113']}; {'id': '98', 'type': '()', 'children': ['99']}; {'id': '99', 'type': 'boolean_operator', 'children': ['100', '103'], 'value': 'and'}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'active_components'}; {'id': '103', 'type': 'call', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'any'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'list_comprehension', 'children': ['107', '110']}; {'id': '107', 'type': 'comparison_operator', 'children': ['108', '109'], 'value': 'in'}; {'id': '108', 'type': 'string', 'children': [], 'value': '"components"'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '110', 'type': 'for_in_clause', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '113', 'type': 'block', 'children': ['114']}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'augmented_assignment', 'children': ['116', '117'], 'value': '+='}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '117', 'type': 'list', 'children': ['118'], 'value': '["components.is_active"]'}; {'id': '118', 'type': 'string', 'children': [], 'value': '"components.is_active"'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'call', 'children': ['121', '124']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'refresh_products'}; {'id': '124', 'type': 'argument_list', 'children': ['125', '133']}; {'id': '125', 'type': 'keyword_argument', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '127', 'type': 'boolean_operator', 'children': ['128', '132'], 'value': 'or'}; {'id': '128', 'type': 'boolean_operator', 'children': ['129', '130'], 'value': 'and'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '130', 'type': 'list', 'children': ['131'], 'value': '[productname]'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '132', 'type': 'None', 'children': []}; {'id': '133', 'type': 'keyword_argument', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '136', 'type': 'if_statement', 'children': ['137', '140', '163', '183', '212', '243']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'products'}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'for_statement', 'children': ['142', '143', '157']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '143', 'type': 'call', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '145', 'type': 'argument_list', 'children': ['146']}; {'id': '146', 'type': 'list_comprehension', 'children': ['147', '150']}; {'id': '147', 'type': 'subscript', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '149', 'type': 'string', 'children': [], 'value': '"name"'}; {'id': '150', 'type': 'for_in_clause', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '152', 'type': 'call', 'children': ['153', '156']}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'getproducts'}; {'id': '156', 'type': 'argument_list', 'children': []}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '163', 'type': 'elif_clause', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'fastcomponents'}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'for_statement', 'children': ['167', '168', '177']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '168', 'type': 'call', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '170', 'type': 'argument_list', 'children': ['171']}; {'id': '171', 'type': 'call', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'getcomponents'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '177', 'type': 'block', 'children': ['178']}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'call', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '183', 'type': 'elif_clause', 'children': ['184', '187']}; {'id': '184', 'type': 'attribute', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'components'}; {'id': '187', 'type': 'block', 'children': ['188', '197']}; {'id': '188', 'type': 'expression_statement', 'children': ['189']}; {'id': '189', 'type': 'assignment', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '191', 'type': 'call', 'children': ['192', '195']}; {'id': '192', 'type': 'attribute', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'getcomponentsdetails'}; {'id': '195', 'type': 'argument_list', 'children': ['196']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '197', 'type': 'for_statement', 'children': ['198', '199', '206']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '199', 'type': 'call', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '201', 'type': 'argument_list', 'children': ['202']}; {'id': '202', 'type': 'call', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': '_filter_components'}; {'id': '204', 'type': 'argument_list', 'children': ['205']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '206', 'type': 'block', 'children': ['207']}; {'id': '207', 'type': 'expression_statement', 'children': ['208']}; {'id': '208', 'type': 'call', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '210', 'type': 'argument_list', 'children': ['211']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '212', 'type': 'elif_clause', 'children': ['213', '216']}; {'id': '213', 'type': 'attribute', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '216', 'type': 'block', 'children': ['217', '227']}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'assignment', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'proddict'}; {'id': '220', 'type': 'subscript', 'children': ['221', '226']}; {'id': '221', 'type': 'call', 'children': ['222', '225']}; {'id': '222', 'type': 'attribute', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'getproducts'}; {'id': '225', 'type': 'argument_list', 'children': []}; {'id': '226', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '227', 'type': 'for_statement', 'children': ['228', '229', '232']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '229', 'type': 'subscript', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'proddict'}; {'id': '231', 'type': 'string', 'children': [], 'value': "'versions'"}; {'id': '232', 'type': 'block', 'children': ['233']}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'call', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '236', 'type': 'argument_list', 'children': ['237']}; {'id': '237', 'type': 'call', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'to_encoding'}; {'id': '239', 'type': 'argument_list', 'children': ['240']}; {'id': '240', 'type': 'subscript', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '242', 'type': 'string', 'children': [], 'value': '"name"'}; {'id': '243', 'type': 'elif_clause', 'children': ['244', '247']}; {'id': '244', 'type': 'attribute', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'opt'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'component_owners'}; {'id': '247', 'type': 'block', 'children': ['248', '257']}; {'id': '248', 'type': 'expression_statement', 'children': ['249']}; {'id': '249', 'type': 'assignment', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '251', 'type': 'call', 'children': ['252', '255']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'bz'}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'getcomponentsdetails'}; {'id': '255', 'type': 'argument_list', 'children': ['256']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'productname'}; {'id': '257', 'type': 'for_statement', 'children': ['258', '259', '266']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '259', 'type': 'call', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '261', 'type': 'argument_list', 'children': ['262']}; {'id': '262', 'type': 'call', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': '_filter_components'}; {'id': '264', 'type': 'argument_list', 'children': ['265']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '266', 'type': 'block', 'children': ['267']}; {'id': '267', 'type': 'expression_statement', 'children': ['268']}; {'id': '268', 'type': 'call', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '270', 'type': 'argument_list', 'children': ['271']}; {'id': '271', 'type': 'call', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'to_encoding'}; {'id': '273', 'type': 'argument_list', 'children': ['274']}; {'id': '274', 'type': 'binary_operator', 'children': ['275', '276'], 'value': '%'}; {'id': '275', 'type': 'string', 'children': [], 'value': 'u"%s: %s"'}; {'id': '276', 'type': 'tuple', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '278', 'type': 'subscript', 'children': ['279', '282']}; {'id': '279', 'type': 'subscript', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '282', 'type': 'string', 'children': [], 'value': "'default_assigned_to'"} | Handle the 'info' subcommand |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_process_include_fields'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'exclude_fields'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'extra_fields'}; {'id': '8', 'type': 'block', 'children': ['9', '56', '60', '113', '130']}; {'id': '9', 'type': 'function_definition', 'children': ['10', '11', '13']}; {'id': '10', 'type': 'function_name', 'children': [], 'value': '_convert_fields'}; {'id': '11', 'type': 'parameters', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '13', 'type': 'block', 'children': ['14', '20', '54']}; {'id': '14', 'type': 'if_statement', 'children': ['15', '17']}; {'id': '15', 'type': 'not_operator', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '17', 'type': 'block', 'children': ['18']}; {'id': '18', 'type': 'return_statement', 'children': ['19']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '20', 'type': 'for_statement', 'children': ['21', '24', '29']}; {'id': '21', 'type': 'pattern_list', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'newname'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'oldname'}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': '_get_api_aliases'}; {'id': '28', 'type': 'argument_list', 'children': []}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'if_statement', 'children': ['31', '34']}; {'id': '31', 'type': 'comparison_operator', 'children': ['32', '33'], 'value': 'in'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'oldname'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '34', 'type': 'block', 'children': ['35', '42']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'remove'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'oldname'}; {'id': '42', 'type': 'if_statement', 'children': ['43', '46']}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '45'], 'value': 'not'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'newname'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '46', 'type': 'block', 'children': ['47']}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'call', 'children': ['49', '52']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'newname'}; {'id': '54', 'type': 'return_statement', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': '_in'}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'assignment', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '59', 'type': 'dictionary', 'children': []}; {'id': '60', 'type': 'if_statement', 'children': ['61', '68']}; {'id': '61', 'type': 'call', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': '_check_version'}; {'id': '65', 'type': 'argument_list', 'children': ['66', '67']}; {'id': '66', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '67', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '68', 'type': 'block', 'children': ['69', '97']}; {'id': '69', 'type': 'if_statement', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '71', 'type': 'block', 'children': ['72', '79', '91']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': '_convert_fields'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '79', 'type': 'if_statement', 'children': ['80', '83']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '82'], 'value': 'not'}; {'id': '81', 'type': 'string', 'children': [], 'value': '"id"'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '83', 'type': 'block', 'children': ['84']}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'string', 'children': [], 'value': '"id"'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '96']}; {'id': '93', 'type': 'subscript', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '95', 'type': 'string', 'children': [], 'value': '"include_fields"'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'include_fields'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'exclude_fields'}; {'id': '99', 'type': 'block', 'children': ['100', '107']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'exclude_fields'}; {'id': '103', 'type': 'call', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': '_convert_fields'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'exclude_fields'}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '112']}; {'id': '109', 'type': 'subscript', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '111', 'type': 'string', 'children': [], 'value': '"exclude_fields"'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'exclude_fields'}; {'id': '113', 'type': 'if_statement', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': '_supports_getbug_extra_fields'}; {'id': '117', 'type': 'block', 'children': ['118']}; {'id': '118', 'type': 'if_statement', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'extra_fields'}; {'id': '120', 'type': 'block', 'children': ['121']}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '126']}; {'id': '123', 'type': 'subscript', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '125', 'type': 'string', 'children': [], 'value': '"extra_fields"'}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': '_convert_fields'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'extra_fields'}; {'id': '130', 'type': 'return_statement', 'children': ['131']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'ret'} | Internal helper to process include_fields lists |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'pre_translation'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '6', 'type': 'block', 'children': ['7', '15', '57', '85', '95', '123', '139']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'old'}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '14', 'type': 'argument_list', 'children': []}; {'id': '15', 'type': 'if_statement', 'children': ['16', '19']}; {'id': '16', 'type': 'comparison_operator', 'children': ['17', '18'], 'value': 'in'}; {'id': '17', 'type': 'string', 'children': [], 'value': "'bug_id'"}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '19', 'type': 'block', 'children': ['20', '53']}; {'id': '20', 'type': 'if_statement', 'children': ['21', '29', '43']}; {'id': '21', 'type': 'not_operator', 'children': ['22']}; {'id': '22', 'type': 'call', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '28']}; {'id': '25', 'type': 'subscript', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '27', 'type': 'string', 'children': [], 'value': "'bug_id'"}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '35']}; {'id': '32', 'type': 'subscript', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '34', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '35', 'type': 'call', 'children': ['36', '41']}; {'id': '36', 'type': 'attribute', 'children': ['37', '40']}; {'id': '37', 'type': 'subscript', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '39', 'type': 'string', 'children': [], 'value': "'bug_id'"}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'string', 'children': [], 'value': "','"}; {'id': '43', 'type': 'else_clause', 'children': ['44']}; {'id': '44', 'type': 'block', 'children': ['45']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '50']}; {'id': '47', 'type': 'subscript', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '49', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '50', 'type': 'subscript', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '52', 'type': 'string', 'children': [], 'value': "'bug_id'"}; {'id': '53', 'type': 'delete_statement', 'children': ['54']}; {'id': '54', 'type': 'subscript', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '56', 'type': 'string', 'children': [], 'value': "'bug_id'"}; {'id': '57', 'type': 'if_statement', 'children': ['58', '61']}; {'id': '58', 'type': 'comparison_operator', 'children': ['59', '60'], 'value': 'in'}; {'id': '59', 'type': 'string', 'children': [], 'value': "'component'"}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '61', 'type': 'block', 'children': ['62']}; {'id': '62', 'type': 'if_statement', 'children': ['63', '71']}; {'id': '63', 'type': 'not_operator', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '66', 'type': 'argument_list', 'children': ['67', '70']}; {'id': '67', 'type': 'subscript', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '69', 'type': 'string', 'children': [], 'value': "'component'"}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '71', 'type': 'block', 'children': ['72']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '77']}; {'id': '74', 'type': 'subscript', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '76', 'type': 'string', 'children': [], 'value': "'component'"}; {'id': '77', 'type': 'call', 'children': ['78', '83']}; {'id': '78', 'type': 'attribute', 'children': ['79', '82']}; {'id': '79', 'type': 'subscript', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '81', 'type': 'string', 'children': [], 'value': "'component'"}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '83', 'type': 'argument_list', 'children': ['84']}; {'id': '84', 'type': 'string', 'children': [], 'value': "','"}; {'id': '85', 'type': 'if_statement', 'children': ['86', '93']}; {'id': '86', 'type': 'boolean_operator', 'children': ['87', '90'], 'value': 'and'}; {'id': '87', 'type': 'comparison_operator', 'children': ['88', '89'], 'value': 'not'}; {'id': '88', 'type': 'string', 'children': [], 'value': "'include_fields'"}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '90', 'type': 'comparison_operator', 'children': ['91', '92'], 'value': 'not'}; {'id': '91', 'type': 'string', 'children': [], 'value': "'column_list'"}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '93', 'type': 'block', 'children': ['94']}; {'id': '94', 'type': 'return_statement', 'children': []}; {'id': '95', 'type': 'if_statement', 'children': ['96', '99']}; {'id': '96', 'type': 'comparison_operator', 'children': ['97', '98'], 'value': 'not'}; {'id': '97', 'type': 'string', 'children': [], 'value': "'include_fields'"}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '99', 'type': 'block', 'children': ['100', '106']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '105']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '104', 'type': 'string', 'children': [], 'value': "'include_fields'"}; {'id': '105', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '106', 'type': 'if_statement', 'children': ['107', '110']}; {'id': '107', 'type': 'comparison_operator', 'children': ['108', '109'], 'value': 'in'}; {'id': '108', 'type': 'string', 'children': [], 'value': "'column_list'"}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '110', 'type': 'block', 'children': ['111', '119']}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'assignment', 'children': ['113', '116']}; {'id': '113', 'type': 'subscript', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '115', 'type': 'string', 'children': [], 'value': "'include_fields'"}; {'id': '116', 'type': 'subscript', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '118', 'type': 'string', 'children': [], 'value': "'column_list'"}; {'id': '119', 'type': 'delete_statement', 'children': ['120']}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'column_list'"}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'call', 'children': ['130', '133']}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': '_process_include_fields'}; {'id': '133', 'type': 'argument_list', 'children': ['134', '137', '138']}; {'id': '134', 'type': 'subscript', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '136', 'type': 'string', 'children': [], 'value': '"include_fields"'}; {'id': '137', 'type': 'None', 'children': []}; {'id': '138', 'type': 'None', 'children': []}; {'id': '139', 'type': 'if_statement', 'children': ['140', '143']}; {'id': '140', 'type': 'comparison_operator', 'children': ['141', '142'], 'value': '!='}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'old'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '143', 'type': 'block', 'children': ['144']}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'call', 'children': ['146', '149']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '149', 'type': 'argument_list', 'children': ['150', '151']}; {'id': '150', 'type': 'string', 'children': [], 'value': '"RHBugzilla pretranslated query to: %s"'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'query'} | Translates the query for possible aliases |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '10']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'filecache'}; {'id': '3', 'type': 'parameters', 'children': ['4', '7']}; {'id': '4', 'type': 'default_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '6', 'type': 'None', 'children': []}; {'id': '7', 'type': 'default_parameter', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'fail_silently'}; {'id': '9', 'type': 'False', 'children': []}; {'id': '10', 'type': 'block', 'children': ['11', '13', '231', '254']}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'''\n filecache is called and the decorator should be returned.\n '''"}; {'id': '13', 'type': 'function_definition', 'children': ['14', '15', '17']}; {'id': '14', 'type': 'function_name', 'children': [], 'value': 'filecache_decorator'}; {'id': '15', 'type': 'parameters', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '17', 'type': 'block', 'children': ['18', '161', '229']}; {'id': '18', 'type': 'decorated_definition', 'children': ['19', '26']}; {'id': '19', 'type': 'decorator', 'children': ['20']}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': '_functools'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'wraps'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '26', 'type': 'function_definition', 'children': ['27', '28', '33']}; {'id': '27', 'type': 'function_name', 'children': [], 'value': 'function_with_cache'}; {'id': '28', 'type': 'parameters', 'children': ['29', '31']}; {'id': '29', 'type': 'list_splat_pattern', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '31', 'type': 'dictionary_splat_pattern', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '33', 'type': 'block', 'children': ['34', '102', '112', '159']}; {'id': '34', 'type': 'try_statement', 'children': ['35', '81']}; {'id': '35', 'type': 'block', 'children': ['36', '45']}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': '_args_key'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '43', '44']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '45', 'type': 'if_statement', 'children': ['46', '51']}; {'id': '46', 'type': 'comparison_operator', 'children': ['47', '48'], 'value': 'in'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '51', 'type': 'block', 'children': ['52', '60']}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'rv'}; {'id': '55', 'type': 'subscript', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '60', 'type': 'if_statement', 'children': ['61', '76']}; {'id': '61', 'type': 'boolean_operator', 'children': ['62', '65'], 'value': 'or'}; {'id': '62', 'type': 'comparison_operator', 'children': ['63', '64'], 'value': 'is'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '64', 'type': 'None', 'children': []}; {'id': '65', 'type': 'comparison_operator', 'children': ['66', '75'], 'value': '<'}; {'id': '66', 'type': 'binary_operator', 'children': ['67', '72'], 'value': '-'}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': '_time'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '71', 'type': 'argument_list', 'children': []}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'rv'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'timesig'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'return_statement', 'children': ['78']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'rv'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '81', 'type': 'except_clause', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '83', 'type': 'block', 'children': ['84', '92', '97']}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'error_str'}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': '_traceback'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'format_exc'}; {'id': '91', 'type': 'argument_list', 'children': []}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': '_log_error'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'error_str'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '100']}; {'id': '98', 'type': 'not_operator', 'children': ['99']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'fail_silently'}; {'id': '100', 'type': 'block', 'children': ['101']}; {'id': '101', 'type': 'raise_statement', 'children': []}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'assignment', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'retval'}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '107', 'type': 'argument_list', 'children': ['108', '110']}; {'id': '108', 'type': 'list_splat', 'children': ['109']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '110', 'type': 'dictionary_splat', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '112', 'type': 'try_statement', 'children': ['113', '138']}; {'id': '113', 'type': 'block', 'children': ['114', '130']}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'assignment', 'children': ['116', '121']}; {'id': '116', 'type': 'subscript', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '121', 'type': 'call', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': '_retval'}; {'id': '123', 'type': 'argument_list', 'children': ['124', '129']}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': '_time'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '128', 'type': 'argument_list', 'children': []}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'retval'}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'call', 'children': ['132', '137']}; {'id': '132', 'type': 'attribute', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'sync'}; {'id': '137', 'type': 'argument_list', 'children': []}; {'id': '138', 'type': 'except_clause', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '140', 'type': 'block', 'children': ['141', '149', '154']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'error_str'}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': '_traceback'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'format_exc'}; {'id': '148', 'type': 'argument_list', 'children': []}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': '_log_error'}; {'id': '152', 'type': 'argument_list', 'children': ['153']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'error_str'}; {'id': '154', 'type': 'if_statement', 'children': ['155', '157']}; {'id': '155', 'type': 'not_operator', 'children': ['156']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'fail_silently'}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'raise_statement', 'children': []}; {'id': '159', 'type': 'return_statement', 'children': ['160']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'retval'}; {'id': '161', 'type': 'if_statement', 'children': ['162', '168']}; {'id': '162', 'type': 'not_operator', 'children': ['163']}; {'id': '163', 'type': 'call', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '165', 'type': 'argument_list', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '167', 'type': 'string', 'children': [], 'value': "'_db'"}; {'id': '168', 'type': 'block', 'children': ['169', '176', '221']}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'assignment', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'cache_name'}; {'id': '172', 'type': 'call', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': '_get_cache_name'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '176', 'type': 'if_statement', 'children': ['177', '180', '189']}; {'id': '177', 'type': 'comparison_operator', 'children': ['178', '179'], 'value': 'in'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'cache_name'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'OPEN_DBS'}; {'id': '180', 'type': 'block', 'children': ['181']}; {'id': '181', 'type': 'expression_statement', 'children': ['182']}; {'id': '182', 'type': 'assignment', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '186', 'type': 'subscript', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'OPEN_DBS'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'cache_name'}; {'id': '189', 'type': 'else_clause', 'children': ['190']}; {'id': '190', 'type': 'block', 'children': ['191', '202', '210']}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'assignment', 'children': ['193', '196']}; {'id': '193', 'type': 'attribute', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '196', 'type': 'call', 'children': ['197', '200']}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': '_shelve'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '200', 'type': 'argument_list', 'children': ['201']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'cache_name'}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'assignment', 'children': ['204', '207']}; {'id': '204', 'type': 'subscript', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'OPEN_DBS'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'cache_name'}; {'id': '207', 'type': 'attribute', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '209', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'call', 'children': ['212', '215']}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'atexit'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'register'}; {'id': '215', 'type': 'argument_list', 'children': ['216']}; {'id': '216', 'type': 'attribute', 'children': ['217', '220']}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'assignment', 'children': ['223', '226']}; {'id': '223', 'type': 'attribute', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'function_with_cache'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '226', 'type': 'attribute', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'function'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': '_db'}; {'id': '229', 'type': 'return_statement', 'children': ['230']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'function_with_cache'}; {'id': '231', 'type': 'if_statement', 'children': ['232', '240']}; {'id': '232', 'type': 'comparison_operator', 'children': ['233', '237'], 'value': '=='}; {'id': '233', 'type': 'call', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '235', 'type': 'argument_list', 'children': ['236']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'types'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'FunctionType'}; {'id': '240', 'type': 'block', 'children': ['241', '245', '249']}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'assignment', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'func'}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '245', 'type': 'expression_statement', 'children': ['246']}; {'id': '246', 'type': 'assignment', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'seconds_of_validity'}; {'id': '248', 'type': 'None', 'children': []}; {'id': '249', 'type': 'return_statement', 'children': ['250']}; {'id': '250', 'type': 'call', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'filecache_decorator'}; {'id': '252', 'type': 'argument_list', 'children': ['253']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'func'}; {'id': '254', 'type': 'return_statement', 'children': ['255']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'filecache_decorator'} | filecache is called and the decorator should be returned. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_trading_timeline'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '6', 'type': 'block', 'children': ['7', '9', '26', '41', '324']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'string', 'children': [], 'value': "''' Build the daily-based index we will trade on '''"}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '18', '21']}; {'id': '17', 'type': 'string', 'children': [], 'value': "'2000/01/01'"}; {'id': '18', 'type': 'keyword_argument', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'periods'}; {'id': '20', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '21', 'type': 'keyword_argument', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'tz'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'pytz'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'utc'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '29', 'type': 'call', 'children': ['30', '35']}; {'id': '30', 'type': 'attribute', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'dt'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'keyword_argument', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'tz'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'pytz'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'utc'}; {'id': '41', 'type': 'if_statement', 'children': ['42', '44', '133']}; {'id': '42', 'type': 'not_operator', 'children': ['43']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '44', 'type': 'block', 'children': ['45']}; {'id': '45', 'type': 'if_statement', 'children': ['46', '48', '70']}; {'id': '46', 'type': 'not_operator', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '48', 'type': 'block', 'children': ['49', '53']}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '60', 'type': 'argument_list', 'children': ['61', '64']}; {'id': '61', 'type': 'keyword_argument', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '64', 'type': 'keyword_argument', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'string', 'children': [], 'value': "'23h59'"}; {'id': '70', 'type': 'else_clause', 'children': ['71']}; {'id': '71', 'type': 'block', 'children': ['72', '79']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '79', 'type': 'if_statement', 'children': ['80', '83', '110']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '82'], 'value': '<'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '83', 'type': 'block', 'children': ['84', '106']}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '91', 'type': 'argument_list', 'children': ['92', '103']}; {'id': '92', 'type': 'keyword_argument', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '94', 'type': 'binary_operator', 'children': ['95', '96'], 'value': '-'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '96', 'type': 'binary_operator', 'children': ['97', '98'], 'value': '*'}; {'id': '97', 'type': 'integer', 'children': [], 'value': '360'}; {'id': '98', 'type': 'attribute', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'datetools'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '103', 'type': 'keyword_argument', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '110', 'type': 'elif_clause', 'children': ['111', '114']}; {'id': '111', 'type': 'comparison_operator', 'children': ['112', '113'], 'value': '>'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '114', 'type': 'block', 'children': ['115', '119']}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '122', 'type': 'call', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '126', 'type': 'argument_list', 'children': ['127', '130']}; {'id': '127', 'type': 'keyword_argument', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '130', 'type': 'keyword_argument', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '133', 'type': 'else_clause', 'children': ['134']}; {'id': '134', 'type': 'block', 'children': ['135', '142']}; {'id': '135', 'type': 'expression_statement', 'children': ['136']}; {'id': '136', 'type': 'assignment', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '138', 'type': 'call', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '142', 'type': 'if_statement', 'children': ['143', '146', '267']}; {'id': '143', 'type': 'comparison_operator', 'children': ['144', '145'], 'value': '<'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '146', 'type': 'block', 'children': ['147']}; {'id': '147', 'type': 'if_statement', 'children': ['148', '150', '196']}; {'id': '148', 'type': 'not_operator', 'children': ['149']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '150', 'type': 'block', 'children': ['151', '163', '178', '182']}; {'id': '151', 'type': 'expression_statement', 'children': ['152']}; {'id': '152', 'type': 'assignment', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '154', 'type': 'binary_operator', 'children': ['155', '156'], 'value': '+'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '156', 'type': 'binary_operator', 'children': ['157', '158'], 'value': '*'}; {'id': '157', 'type': 'integer', 'children': [], 'value': '360'}; {'id': '158', 'type': 'attribute', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'datetools'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '163', 'type': 'if_statement', 'children': ['164', '167']}; {'id': '164', 'type': 'comparison_operator', 'children': ['165', '166'], 'value': '>'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '167', 'type': 'block', 'children': ['168']}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'assignment', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '171', 'type': 'binary_operator', 'children': ['172', '173'], 'value': '-'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '173', 'type': 'attribute', 'children': ['174', '177']}; {'id': '174', 'type': 'attribute', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'datetools'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'assignment', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'assignment', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '189', 'type': 'argument_list', 'children': ['190', '193']}; {'id': '190', 'type': 'keyword_argument', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '193', 'type': 'keyword_argument', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '196', 'type': 'else_clause', 'children': ['197']}; {'id': '197', 'type': 'block', 'children': ['198', '205']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '201', 'type': 'call', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '205', 'type': 'if_statement', 'children': ['206', '209', '228']}; {'id': '206', 'type': 'comparison_operator', 'children': ['207', '208'], 'value': '<'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '209', 'type': 'block', 'children': ['210', '214']}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'assignment', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'assignment', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '217', 'type': 'call', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '221', 'type': 'argument_list', 'children': ['222', '225']}; {'id': '222', 'type': 'keyword_argument', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '225', 'type': 'keyword_argument', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '228', 'type': 'elif_clause', 'children': ['229', '232']}; {'id': '229', 'type': 'comparison_operator', 'children': ['230', '231'], 'value': '>'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '232', 'type': 'block', 'children': ['233', '253']}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '236', 'type': 'call', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '240', 'type': 'argument_list', 'children': ['241', '244']}; {'id': '241', 'type': 'keyword_argument', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '244', 'type': 'keyword_argument', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '246', 'type': 'binary_operator', 'children': ['247', '248'], 'value': '-'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '248', 'type': 'attribute', 'children': ['249', '252']}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'datetools'}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '253', 'type': 'expression_statement', 'children': ['254']}; {'id': '254', 'type': 'assignment', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '256', 'type': 'call', 'children': ['257', '260']}; {'id': '257', 'type': 'attribute', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '260', 'type': 'argument_list', 'children': ['261', '264']}; {'id': '261', 'type': 'keyword_argument', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '264', 'type': 'keyword_argument', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '267', 'type': 'elif_clause', 'children': ['268', '271']}; {'id': '268', 'type': 'comparison_operator', 'children': ['269', '270'], 'value': '>'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'now'}; {'id': '271', 'type': 'block', 'children': ['272']}; {'id': '272', 'type': 'if_statement', 'children': ['273', '275', '297']}; {'id': '273', 'type': 'not_operator', 'children': ['274']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '275', 'type': 'block', 'children': ['276', '280']}; {'id': '276', 'type': 'expression_statement', 'children': ['277']}; {'id': '277', 'type': 'assignment', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '280', 'type': 'expression_statement', 'children': ['281']}; {'id': '281', 'type': 'assignment', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '283', 'type': 'call', 'children': ['284', '287']}; {'id': '284', 'type': 'attribute', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '287', 'type': 'argument_list', 'children': ['288', '291']}; {'id': '288', 'type': 'keyword_argument', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '291', 'type': 'keyword_argument', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '293', 'type': 'call', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '295', 'type': 'argument_list', 'children': ['296']}; {'id': '296', 'type': 'string', 'children': [], 'value': "'23h59'"}; {'id': '297', 'type': 'else_clause', 'children': ['298']}; {'id': '298', 'type': 'block', 'children': ['299', '306', '310']}; {'id': '299', 'type': 'expression_statement', 'children': ['300']}; {'id': '300', 'type': 'assignment', 'children': ['301', '302']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '302', 'type': 'call', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'normalize_date_format'}; {'id': '304', 'type': 'argument_list', 'children': ['305']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '306', 'type': 'expression_statement', 'children': ['307']}; {'id': '307', 'type': 'assignment', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'EMPTY_DATES'}; {'id': '310', 'type': 'expression_statement', 'children': ['311']}; {'id': '311', 'type': 'assignment', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'live_dates'}; {'id': '313', 'type': 'call', 'children': ['314', '317']}; {'id': '314', 'type': 'attribute', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'date_range'}; {'id': '317', 'type': 'argument_list', 'children': ['318', '321']}; {'id': '318', 'type': 'keyword_argument', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '321', 'type': 'keyword_argument', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '324', 'type': 'return_statement', 'children': ['325']}; {'id': '325', 'type': 'binary_operator', 'children': ['326', '327'], 'value': '+'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'bt_dates'}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'live_dates'} | Build the daily-based index we will trade on |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_format_command'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'show_nested'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10', '21', '31', '41', '51', '61', '70', '77', '87', '96', '103', '113', '122', '129', '133', '141', '150']}; {'id': '10', 'type': 'if_statement', 'children': ['11', '19']}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '13', 'type': 'argument_list', 'children': ['14', '17', '18']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '17', 'type': 'string', 'children': [], 'value': "'hidden'"}; {'id': '18', 'type': 'False', 'children': []}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'return_statement', 'children': []}; {'id': '21', 'type': 'for_statement', 'children': ['22', '23', '27']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '23', 'type': 'call', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': '_format_description'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'yield', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'yield', 'children': ['33']}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'string', 'children': [], 'value': "'.. program:: {}'"}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'command_path'}; {'id': '41', 'type': 'for_statement', 'children': ['42', '43', '47']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': '_format_usage'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'yield', 'children': ['50']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '54', 'type': 'call', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': '_format_options'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '61', 'type': 'if_statement', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '63', 'type': 'block', 'children': ['64', '67']}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'yield', 'children': ['66']}; {'id': '66', 'type': 'string', 'children': [], 'value': "'.. rubric:: Options'"}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'yield', 'children': ['69']}; {'id': '69', 'type': 'string', 'children': [], 'value': "''"}; {'id': '70', 'type': 'for_statement', 'children': ['71', '72', '73']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '73', 'type': 'block', 'children': ['74']}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'yield', 'children': ['76']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '80', 'type': 'call', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'call', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': '_format_arguments'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '87', 'type': 'if_statement', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '89', 'type': 'block', 'children': ['90', '93']}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'yield', 'children': ['92']}; {'id': '92', 'type': 'string', 'children': [], 'value': "'.. rubric:: Arguments'"}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'yield', 'children': ['95']}; {'id': '95', 'type': 'string', 'children': [], 'value': "''"}; {'id': '96', 'type': 'for_statement', 'children': ['97', '98', '99']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '99', 'type': 'block', 'children': ['100']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'yield', 'children': ['102']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '106', 'type': 'call', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '108', 'type': 'argument_list', 'children': ['109']}; {'id': '109', 'type': 'call', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': '_format_envvars'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '113', 'type': 'if_statement', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '115', 'type': 'block', 'children': ['116', '119']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'yield', 'children': ['118']}; {'id': '118', 'type': 'string', 'children': [], 'value': "'.. rubric:: Environment variables'"}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'yield', 'children': ['121']}; {'id': '121', 'type': 'string', 'children': [], 'value': "''"}; {'id': '122', 'type': 'for_statement', 'children': ['123', '124', '125']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '125', 'type': 'block', 'children': ['126']}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'yield', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '129', 'type': 'if_statement', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'show_nested'}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'return_statement', 'children': []}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '136', 'type': 'call', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': '_filter_commands'}; {'id': '138', 'type': 'argument_list', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '141', 'type': 'if_statement', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '143', 'type': 'block', 'children': ['144', '147']}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'yield', 'children': ['146']}; {'id': '146', 'type': 'string', 'children': [], 'value': "'.. rubric:: Commands'"}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'yield', 'children': ['149']}; {'id': '149', 'type': 'string', 'children': [], 'value': "''"}; {'id': '150', 'type': 'for_statement', 'children': ['151', '152', '153']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '153', 'type': 'block', 'children': ['154', '167', '177']}; {'id': '154', 'type': 'if_statement', 'children': ['155', '160']}; {'id': '155', 'type': 'comparison_operator', 'children': ['156', '157'], 'value': '>='}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'CLICK_VERSION'}; {'id': '157', 'type': 'tuple', 'children': ['158', '159']}; {'id': '158', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '159', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '160', 'type': 'block', 'children': ['161']}; {'id': '161', 'type': 'if_statement', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'hidden'}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'continue_statement', 'children': []}; {'id': '167', 'type': 'for_statement', 'children': ['168', '169', '173']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '169', 'type': 'call', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': '_format_subcommand'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '173', 'type': 'block', 'children': ['174']}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'yield', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'yield', 'children': ['179']}; {'id': '179', 'type': 'string', 'children': [], 'value': "''"} | Format the output of `click.Command`. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__parse'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'stream'}; {'id': '6', 'type': 'block', 'children': ['7', '18', '27', '34', '41']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '10']}; {'id': '8', 'type': 'not_operator', 'children': ['9']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'stream'}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'raise_statement', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'InvalidFormatError'}; {'id': '14', 'type': 'argument_list', 'children': ['15']}; {'id': '15', 'type': 'keyword_argument', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'cause'}; {'id': '17', 'type': 'string', 'children': [], 'value': '"stream cannot be empty or None"'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': '__load_json'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'stream'}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': '__parse_organizations'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': '__parse_identities'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'call', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': '__parse_blacklist'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'json'} | Parse Sorting Hat stream |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__create_profile_from_identities'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'identities'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '8', 'type': 'block', 'children': ['9', '12', '16', '20', '24', '28', '32', '115', '153', '163', '175']}; {'id': '9', 'type': 'import_statement', 'children': ['10']}; {'id': '10', 'type': 'dotted_name', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'EMAIL_ADDRESS_REGEX'}; {'id': '15', 'type': 'string', 'children': [], 'value': 'r"^(?P<email>[^\\s@]+@[^\\s@.]+\\.[^\\s@]+)$"'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'NAME_REGEX'}; {'id': '19', 'type': 'string', 'children': [], 'value': 'r"^\\w+\\s\\w+"'}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '27', 'type': 'None', 'children': []}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '31', 'type': 'None', 'children': []}; {'id': '32', 'type': 'for_statement', 'children': ['33', '34', '35']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'identities'}; {'id': '35', 'type': 'block', 'children': ['36', '65', '94']}; {'id': '36', 'type': 'if_statement', 'children': ['37', '43']}; {'id': '37', 'type': 'boolean_operator', 'children': ['38', '40'], 'value': 'and'}; {'id': '38', 'type': 'not_operator', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '43', 'type': 'block', 'children': ['44', '56']}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '51', 'type': 'argument_list', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'NAME_REGEX'}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '56', 'type': 'if_statement', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '65', 'type': 'if_statement', 'children': ['66', '72']}; {'id': '66', 'type': 'boolean_operator', 'children': ['67', '69'], 'value': 'and'}; {'id': '67', 'type': 'not_operator', 'children': ['68']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '72', 'type': 'block', 'children': ['73', '85']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '80', 'type': 'argument_list', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'EMAIL_ADDRESS_REGEX'}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '85', 'type': 'if_statement', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '87', 'type': 'block', 'children': ['88']}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'assignment', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '94', 'type': 'if_statement', 'children': ['95', '97']}; {'id': '95', 'type': 'not_operator', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '97', 'type': 'block', 'children': ['98']}; {'id': '98', 'type': 'if_statement', 'children': ['99', '108']}; {'id': '99', 'type': 'boolean_operator', 'children': ['100', '103'], 'value': 'and'}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '103', 'type': 'comparison_operator', 'children': ['104', '107'], 'value': '!='}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '107', 'type': 'string', 'children': [], 'value': "'None'"}; {'id': '108', 'type': 'block', 'children': ['109']}; {'id': '109', 'type': 'expression_statement', 'children': ['110']}; {'id': '110', 'type': 'assignment', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '115', 'type': 'if_statement', 'children': ['116', '118']}; {'id': '116', 'type': 'not_operator', 'children': ['117']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '118', 'type': 'block', 'children': ['119']}; {'id': '119', 'type': 'if_statement', 'children': ['120', '121', '133', '147']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '121', 'type': 'block', 'children': ['122']}; {'id': '122', 'type': 'expression_statement', 'children': ['123']}; {'id': '123', 'type': 'assignment', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '125', 'type': 'subscript', 'children': ['126', '132']}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'string', 'children': [], 'value': "'@'"}; {'id': '132', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '133', 'type': 'elif_clause', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '135', 'type': 'block', 'children': ['136']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '139', 'type': 'subscript', 'children': ['140', '146']}; {'id': '140', 'type': 'call', 'children': ['141', '144']}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '144', 'type': 'argument_list', 'children': ['145']}; {'id': '145', 'type': 'string', 'children': [], 'value': "'@'"}; {'id': '146', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '147', 'type': 'else_clause', 'children': ['148']}; {'id': '148', 'type': 'block', 'children': ['149']}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'assignment', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '152', 'type': 'None', 'children': []}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'kw'}; {'id': '156', 'type': 'dictionary', 'children': ['157', '160']}; {'id': '157', 'type': 'pair', 'children': ['158', '159']}; {'id': '158', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '160', 'type': 'pair', 'children': ['161', '162']}; {'id': '161', 'type': 'string', 'children': [], 'value': "'email'"}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'email'}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'call', 'children': ['165', '168']}; {'id': '165', 'type': 'attribute', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'api'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'edit_profile'}; {'id': '168', 'type': 'argument_list', 'children': ['169', '172', '173']}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '173', 'type': 'dictionary_splat', 'children': ['174']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'kw'}; {'id': '175', 'type': 'expression_statement', 'children': ['176']}; {'id': '176', 'type': 'call', 'children': ['177', '180']}; {'id': '177', 'type': 'attribute', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '180', 'type': 'argument_list', 'children': ['181', '184']}; {'id': '181', 'type': 'binary_operator', 'children': ['182', '183'], 'value': '%'}; {'id': '182', 'type': 'string', 'children': [], 'value': '"-- profile %s updated"'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'verbose'} | Create a profile using the data from the identities |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'init_process_dut'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '8', 'type': 'block', 'children': ['9', '311', '320']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '17', '97']}; {'id': '10', 'type': 'boolean_operator', 'children': ['11', '14'], 'value': 'and'}; {'id': '11', 'type': 'comparison_operator', 'children': ['12', '13'], 'value': 'in'}; {'id': '12', 'type': 'string', 'children': [], 'value': '"subtype"'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '14', 'type': 'subscript', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '16', 'type': 'string', 'children': [], 'value': '"subtype"'}; {'id': '17', 'type': 'block', 'children': ['18', '50', '54', '65', '74', '91']}; {'id': '18', 'type': 'if_statement', 'children': ['19', '24']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '23'], 'value': '!='}; {'id': '20', 'type': 'subscript', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '22', 'type': 'string', 'children': [], 'value': '"subtype"'}; {'id': '23', 'type': 'string', 'children': [], 'value': '"console"'}; {'id': '24', 'type': 'block', 'children': ['25', '29', '45']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '28', 'type': 'string', 'children': [], 'value': '"Unrecognized process subtype: {}"'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '36']}; {'id': '31', 'type': 'attribute', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '44', 'type': 'string', 'children': [], 'value': '"subtype"'}; {'id': '45', 'type': 'raise_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'ResourceInitError'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'string', 'children': [], 'value': '"Unrecognized process subtype: {}"'}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '53', 'type': 'None', 'children': []}; {'id': '54', 'type': 'if_statement', 'children': ['55', '58']}; {'id': '55', 'type': 'comparison_operator', 'children': ['56', '57'], 'value': 'in'}; {'id': '56', 'type': 'string', 'children': [], 'value': '"application"'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '62', 'type': 'subscript', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '64', 'type': 'string', 'children': [], 'value': '"application"'}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'call', 'children': ['67', '72']}; {'id': '67', 'type': 'attribute', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '72', 'type': 'argument_list', 'children': ['73']}; {'id': '73', 'type': 'string', 'children': [], 'value': '"Starting a remote console"'}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'DutConsole'}; {'id': '79', 'type': 'argument_list', 'children': ['80', '85', '88']}; {'id': '80', 'type': 'keyword_argument', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '82', 'type': 'binary_operator', 'children': ['83', '84'], 'value': '%'}; {'id': '83', 'type': 'string', 'children': [], 'value': '"D%d"'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '85', 'type': 'keyword_argument', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '88', 'type': 'keyword_argument', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '97', 'type': 'else_clause', 'children': ['98']}; {'id': '98', 'type': 'block', 'children': ['99', '107', '113', '123', '133', '144', '161', '167', '173', '200', '224', '252', '276', '287', '299']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'binary'}; {'id': '102', 'type': 'subscript', 'children': ['103', '106']}; {'id': '103', 'type': 'subscript', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '105', 'type': 'string', 'children': [], 'value': '"application"'}; {'id': '106', 'type': 'string', 'children': [], 'value': "'bin'"}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'app_config'}; {'id': '110', 'type': 'subscript', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '112', 'type': 'string', 'children': [], 'value': '"application"'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'init_cli_cmds'}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'app_config'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '120', 'type': 'argument_list', 'children': ['121', '122']}; {'id': '121', 'type': 'string', 'children': [], 'value': '"init_cli_cmds"'}; {'id': '122', 'type': 'None', 'children': []}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'post_cli_cmds'}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'app_config'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '130', 'type': 'argument_list', 'children': ['131', '132']}; {'id': '131', 'type': 'string', 'children': [], 'value': '"post_cli_cmds"'}; {'id': '132', 'type': 'None', 'children': []}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'call', 'children': ['135', '140']}; {'id': '135', 'type': 'attribute', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'binary_operator', 'children': ['142', '143'], 'value': '%'}; {'id': '142', 'type': 'string', 'children': [], 'value': '"Starting process \'%s\'"'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'binary'}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'assignment', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '147', 'type': 'call', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'DutProcess'}; {'id': '149', 'type': 'argument_list', 'children': ['150', '155', '158']}; {'id': '150', 'type': 'keyword_argument', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '152', 'type': 'binary_operator', 'children': ['153', '154'], 'value': '%'}; {'id': '153', 'type': 'string', 'children': [], 'value': '"D%d"'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '155', 'type': 'keyword_argument', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '158', 'type': 'keyword_argument', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'assignment', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '167', 'type': 'expression_statement', 'children': ['168']}; {'id': '168', 'type': 'assignment', 'children': ['169', '172']}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'binary'}; {'id': '173', 'type': 'if_statement', 'children': ['174', '177']}; {'id': '174', 'type': 'attribute', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'valgrind'}; {'id': '177', 'type': 'block', 'children': ['178']}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'call', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'use_valgrind'}; {'id': '183', 'type': 'argument_list', 'children': ['184', '187', '191', '194', '197']}; {'id': '184', 'type': 'attribute', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'valgrind_tool'}; {'id': '187', 'type': 'not_operator', 'children': ['188']}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'valgrind_text'}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'valgrind_console'}; {'id': '194', 'type': 'attribute', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'valgrind_track_origins'}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'valgrind_extra_params'}; {'id': '200', 'type': 'if_statement', 'children': ['201', '206']}; {'id': '201', 'type': 'comparison_operator', 'children': ['202', '205'], 'value': '=='}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'gdb'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '206', 'type': 'block', 'children': ['207', '213']}; {'id': '207', 'type': 'expression_statement', 'children': ['208']}; {'id': '208', 'type': 'call', 'children': ['209', '212']}; {'id': '209', 'type': 'attribute', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'use_gdb'}; {'id': '212', 'type': 'argument_list', 'children': []}; {'id': '213', 'type': 'expression_statement', 'children': ['214']}; {'id': '214', 'type': 'call', 'children': ['215', '220']}; {'id': '215', 'type': 'attribute', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '220', 'type': 'argument_list', 'children': ['221']}; {'id': '221', 'type': 'binary_operator', 'children': ['222', '223'], 'value': '%'}; {'id': '222', 'type': 'string', 'children': [], 'value': '"GDB is activated for node %i"'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '224', 'type': 'if_statement', 'children': ['225', '230']}; {'id': '225', 'type': 'comparison_operator', 'children': ['226', '229'], 'value': '=='}; {'id': '226', 'type': 'attribute', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'gdbs'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '230', 'type': 'block', 'children': ['231', '241']}; {'id': '231', 'type': 'expression_statement', 'children': ['232']}; {'id': '232', 'type': 'call', 'children': ['233', '236']}; {'id': '233', 'type': 'attribute', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'use_gdbs'}; {'id': '236', 'type': 'argument_list', 'children': ['237', '238']}; {'id': '237', 'type': 'True', 'children': []}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'gdbs_port'}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'call', 'children': ['243', '248']}; {'id': '243', 'type': 'attribute', 'children': ['244', '247']}; {'id': '244', 'type': 'attribute', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '248', 'type': 'argument_list', 'children': ['249']}; {'id': '249', 'type': 'binary_operator', 'children': ['250', '251'], 'value': '%'}; {'id': '250', 'type': 'string', 'children': [], 'value': '"GDBserver is activated for node %i"'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '252', 'type': 'if_statement', 'children': ['253', '258']}; {'id': '253', 'type': 'comparison_operator', 'children': ['254', '257'], 'value': '=='}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'vgdb'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '258', 'type': 'block', 'children': ['259', '265']}; {'id': '259', 'type': 'expression_statement', 'children': ['260']}; {'id': '260', 'type': 'call', 'children': ['261', '264']}; {'id': '261', 'type': 'attribute', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'use_vgdb'}; {'id': '264', 'type': 'argument_list', 'children': []}; {'id': '265', 'type': 'expression_statement', 'children': ['266']}; {'id': '266', 'type': 'call', 'children': ['267', '272']}; {'id': '267', 'type': 'attribute', 'children': ['268', '271']}; {'id': '268', 'type': 'attribute', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '272', 'type': 'argument_list', 'children': ['273']}; {'id': '273', 'type': 'binary_operator', 'children': ['274', '275'], 'value': '%'}; {'id': '274', 'type': 'string', 'children': [], 'value': '"VGDB is activated for node %i"'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '276', 'type': 'if_statement', 'children': ['277', '280']}; {'id': '277', 'type': 'attribute', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'nobuf'}; {'id': '280', 'type': 'block', 'children': ['281']}; {'id': '281', 'type': 'expression_statement', 'children': ['282']}; {'id': '282', 'type': 'call', 'children': ['283', '286']}; {'id': '283', 'type': 'attribute', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'no_std_buf'}; {'id': '286', 'type': 'argument_list', 'children': []}; {'id': '287', 'type': 'if_statement', 'children': ['288', '291']}; {'id': '288', 'type': 'comparison_operator', 'children': ['289', '290'], 'value': 'is'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'init_cli_cmds'}; {'id': '290', 'type': 'None', 'children': []}; {'id': '291', 'type': 'block', 'children': ['292']}; {'id': '292', 'type': 'expression_statement', 'children': ['293']}; {'id': '293', 'type': 'call', 'children': ['294', '297']}; {'id': '294', 'type': 'attribute', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'set_init_cli_cmds'}; {'id': '297', 'type': 'argument_list', 'children': ['298']}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'init_cli_cmds'}; {'id': '299', 'type': 'if_statement', 'children': ['300', '303']}; {'id': '300', 'type': 'comparison_operator', 'children': ['301', '302'], 'value': 'is'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'post_cli_cmds'}; {'id': '302', 'type': 'None', 'children': []}; {'id': '303', 'type': 'block', 'children': ['304']}; {'id': '304', 'type': 'expression_statement', 'children': ['305']}; {'id': '305', 'type': 'call', 'children': ['306', '309']}; {'id': '306', 'type': 'attribute', 'children': ['307', '308']}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'set_post_cli_cmds'}; {'id': '309', 'type': 'argument_list', 'children': ['310']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'post_cli_cmds'}; {'id': '311', 'type': 'expression_statement', 'children': ['312']}; {'id': '312', 'type': 'call', 'children': ['313', '318']}; {'id': '313', 'type': 'attribute', 'children': ['314', '317']}; {'id': '314', 'type': 'attribute', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'duts'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '318', 'type': 'argument_list', 'children': ['319']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '320', 'type': 'expression_statement', 'children': ['321']}; {'id': '321', 'type': 'call', 'children': ['322', '327']}; {'id': '322', 'type': 'attribute', 'children': ['323', '326']}; {'id': '323', 'type': 'attribute', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'contextlist'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'dutinformations'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '327', 'type': 'argument_list', 'children': ['328']}; {'id': '328', 'type': 'call', 'children': ['329', '332']}; {'id': '329', 'type': 'attribute', 'children': ['330', '331']}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'dut'}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'get_info'}; {'id': '332', 'type': 'argument_list', 'children': []} | Initialize process type Dut as DutProcess or DutConsole. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'run'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '15', '26', '36', '60', '66', '99', '116', '129', '179', '228', '263', '274', '326']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'EXIT_SUCCESS'}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '20', 'type': 'conditional_expression', 'children': ['21', '22', '23'], 'value': 'if'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '26', 'type': 'if_statement', 'children': ['27', '33']}; {'id': '27', 'type': 'not_operator', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'check_args'}; {'id': '32', 'type': 'argument_list', 'children': []}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'return_statement', 'children': ['35']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '42']}; {'id': '37', 'type': 'attribute', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'clean'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'if_statement', 'children': ['44', '57']}; {'id': '44', 'type': 'boolean_operator', 'children': ['45', '51'], 'value': 'and'}; {'id': '45', 'type': 'not_operator', 'children': ['46']}; {'id': '46', 'type': 'attribute', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'tc'}; {'id': '51', 'type': 'not_operator', 'children': ['52']}; {'id': '52', 'type': 'attribute', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'suite'}; {'id': '57', 'type': 'block', 'children': ['58']}; {'id': '58', 'type': 'return_statement', 'children': ['59']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '63', 'type': 'call', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'get_fw_version'}; {'id': '65', 'type': 'argument_list', 'children': []}; {'id': '66', 'type': 'if_statement', 'children': ['67', '74', '82']}; {'id': '67', 'type': 'boolean_operator', 'children': ['68', '73'], 'value': 'and'}; {'id': '68', 'type': 'attribute', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '74', 'type': 'block', 'children': ['75', '80']}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'call', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '78', 'type': 'argument_list', 'children': ['79']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '80', 'type': 'return_statement', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '82', 'type': 'elif_clause', 'children': ['83', '91']}; {'id': '83', 'type': 'boolean_operator', 'children': ['84', '89'], 'value': 'and'}; {'id': '84', 'type': 'attribute', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '89', 'type': 'not_operator', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '91', 'type': 'block', 'children': ['92', '97']}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'string', 'children': [], 'value': '"Unable to get version. Have you installed Icetea correctly?"'}; {'id': '97', 'type': 'return_statement', 'children': ['98']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'call', 'children': ['101', '106']}; {'id': '101', 'type': 'attribute', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'conditional_expression', 'children': ['108', '114', '115'], 'value': 'if'}; {'id': '108', 'type': 'call', 'children': ['109', '112']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'string', 'children': [], 'value': '"Using Icetea version {}"'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '112', 'type': 'argument_list', 'children': ['113']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '115', 'type': 'string', 'children': [], 'value': '"Unable to get Icetea version. Is Icetea installed?"'}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'assignment', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '119', 'type': 'call', 'children': ['120', '123']}; {'id': '120', 'type': 'attribute', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': '_init_cloud'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'attribute', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '129', 'type': 'if_statement', 'children': ['130', '135']}; {'id': '130', 'type': 'attribute', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'listsuites'}; {'id': '135', 'type': 'block', 'children': ['136', '150', '177']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '139', 'type': 'call', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'list_suites'}; {'id': '143', 'type': 'argument_list', 'children': ['144', '149']}; {'id': '144', 'type': 'attribute', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'suitedir'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '150', 'type': 'if_statement', 'children': ['151', '154', '170']}; {'id': '151', 'type': 'comparison_operator', 'children': ['152', '153'], 'value': 'is'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '153', 'type': 'None', 'children': []}; {'id': '154', 'type': 'block', 'children': ['155', '164']}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '162']}; {'id': '157', 'type': 'attribute', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'string', 'children': [], 'value': '"No suites found!"'}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'assignment', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'EXIT_FAIL'}; {'id': '170', 'type': 'else_clause', 'children': ['171']}; {'id': '171', 'type': 'block', 'children': ['172']}; {'id': '172', 'type': 'expression_statement', 'children': ['173']}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '177', 'type': 'return_statement', 'children': ['178']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '179', 'type': 'try_statement', 'children': ['180', '200']}; {'id': '180', 'type': 'block', 'children': ['181']}; {'id': '181', 'type': 'expression_statement', 'children': ['182']}; {'id': '182', 'type': 'assignment', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'testsuite'}; {'id': '184', 'type': 'call', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'TestSuite'}; {'id': '186', 'type': 'argument_list', 'children': ['187', '192', '195']}; {'id': '187', 'type': 'keyword_argument', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '192', 'type': 'keyword_argument', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'cloud_module'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '195', 'type': 'keyword_argument', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '200', 'type': 'except_clause', 'children': ['201', '205']}; {'id': '201', 'type': 'as_pattern', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'SuiteException'}; {'id': '203', 'type': 'as_pattern_target', 'children': ['204']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '205', 'type': 'block', 'children': ['206', '220', '226']}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '213']}; {'id': '208', 'type': 'attribute', 'children': ['209', '212']}; {'id': '209', 'type': 'attribute', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '213', 'type': 'argument_list', 'children': ['214']}; {'id': '214', 'type': 'call', 'children': ['215', '218']}; {'id': '215', 'type': 'attribute', 'children': ['216', '217']}; {'id': '216', 'type': 'string', 'children': [], 'value': '"Something went wrong in suite creation! {}"'}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '218', 'type': 'argument_list', 'children': ['219']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '220', 'type': 'expression_statement', 'children': ['221']}; {'id': '221', 'type': 'assignment', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '223', 'type': 'attribute', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'EXIT_INCONC'}; {'id': '226', 'type': 'return_statement', 'children': ['227']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '228', 'type': 'if_statement', 'children': ['229', '234']}; {'id': '229', 'type': 'attribute', 'children': ['230', '233']}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '234', 'type': 'block', 'children': ['235', '248', '256', '261']}; {'id': '235', 'type': 'if_statement', 'children': ['236', '241']}; {'id': '236', 'type': 'attribute', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '241', 'type': 'block', 'children': ['242']}; {'id': '242', 'type': 'expression_statement', 'children': ['243']}; {'id': '243', 'type': 'call', 'children': ['244', '247']}; {'id': '244', 'type': 'attribute', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'testsuite'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'update_testcases'}; {'id': '247', 'type': 'argument_list', 'children': []}; {'id': '248', 'type': 'expression_statement', 'children': ['249']}; {'id': '249', 'type': 'assignment', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'testcases'}; {'id': '251', 'type': 'call', 'children': ['252', '255']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'testsuite'}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'list_testcases'}; {'id': '255', 'type': 'argument_list', 'children': []}; {'id': '256', 'type': 'expression_statement', 'children': ['257']}; {'id': '257', 'type': 'call', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '259', 'type': 'argument_list', 'children': ['260']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'testcases'}; {'id': '261', 'type': 'return_statement', 'children': ['262']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '263', 'type': 'expression_statement', 'children': ['264']}; {'id': '264', 'type': 'assignment', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '266', 'type': 'call', 'children': ['267', '270']}; {'id': '267', 'type': 'attribute', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'runtestsuite'}; {'id': '270', 'type': 'argument_list', 'children': ['271']}; {'id': '271', 'type': 'keyword_argument', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'testsuite'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'testsuite'}; {'id': '274', 'type': 'if_statement', 'children': ['275', '277', '284', '305']}; {'id': '275', 'type': 'not_operator', 'children': ['276']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '277', 'type': 'block', 'children': ['278']}; {'id': '278', 'type': 'expression_statement', 'children': ['279']}; {'id': '279', 'type': 'assignment', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '281', 'type': 'attribute', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'EXIT_SUCCESS'}; {'id': '284', 'type': 'elif_clause', 'children': ['285', '298']}; {'id': '285', 'type': 'boolean_operator', 'children': ['286', '291'], 'value': 'and'}; {'id': '286', 'type': 'call', 'children': ['287', '290']}; {'id': '287', 'type': 'attribute', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'failure_count'}; {'id': '290', 'type': 'argument_list', 'children': []}; {'id': '291', 'type': 'comparison_operator', 'children': ['292', '297'], 'value': 'is'}; {'id': '292', 'type': 'attribute', 'children': ['293', '296']}; {'id': '293', 'type': 'attribute', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'failure_return_value'}; {'id': '297', 'type': 'True', 'children': []}; {'id': '298', 'type': 'block', 'children': ['299']}; {'id': '299', 'type': 'expression_statement', 'children': ['300']}; {'id': '300', 'type': 'assignment', 'children': ['301', '302']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '302', 'type': 'attribute', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'EXIT_FAIL'}; {'id': '305', 'type': 'elif_clause', 'children': ['306', '319']}; {'id': '306', 'type': 'boolean_operator', 'children': ['307', '312'], 'value': 'and'}; {'id': '307', 'type': 'call', 'children': ['308', '311']}; {'id': '308', 'type': 'attribute', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'inconclusive_count'}; {'id': '311', 'type': 'argument_list', 'children': []}; {'id': '312', 'type': 'comparison_operator', 'children': ['313', '318'], 'value': 'is'}; {'id': '313', 'type': 'attribute', 'children': ['314', '317']}; {'id': '314', 'type': 'attribute', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'failure_return_value'}; {'id': '318', 'type': 'True', 'children': []}; {'id': '319', 'type': 'block', 'children': ['320']}; {'id': '320', 'type': 'expression_statement', 'children': ['321']}; {'id': '321', 'type': 'assignment', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'}; {'id': '323', 'type': 'attribute', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'ExitCodes'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'EXIT_INCONC'}; {'id': '326', 'type': 'return_statement', 'children': ['327']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'retcodesummary'} | Runs the set of tests within the given path. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'print_info'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '23', '27', '31', '49', '71', '188', '222', '231', '240', '247']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'PrettyTable'}; {'id': '11', 'type': 'argument_list', 'children': []}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'start_string'}; {'id': '15', 'type': 'call', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'string', 'children': [], 'value': '"DutSerial {} \\n"'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '26', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'info_string'}; {'id': '30', 'type': 'string', 'children': [], 'value': '""'}; {'id': '31', 'type': 'if_statement', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '35', 'type': 'block', 'children': ['36']}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'info_string'}; {'id': '39', 'type': 'binary_operator', 'children': ['40', '41'], 'value': '+'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'info_string'}; {'id': '41', 'type': 'call', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'string', 'children': [], 'value': '"Configuration for this DUT:\\n\\n {} \\n"'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '49', 'type': 'if_statement', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'comport'}; {'id': '53', 'type': 'block', 'children': ['54', '62']}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'call', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'string', 'children': [], 'value': '"COM port"'}; {'id': '61', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'call', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'comport'}; {'id': '71', 'type': 'if_statement', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '75', 'type': 'block', 'children': ['76', '104', '132', '160']}; {'id': '76', 'type': 'if_statement', 'children': ['77', '84']}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '79', 'type': 'argument_list', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '83', 'type': 'string', 'children': [], 'value': '"baudrate"'}; {'id': '84', 'type': 'block', 'children': ['85', '93']}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'call', 'children': ['87', '90']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '90', 'type': 'argument_list', 'children': ['91', '92']}; {'id': '91', 'type': 'string', 'children': [], 'value': '"Baudrate"'}; {'id': '92', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'attribute', 'children': ['100', '103']}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'baudrate'}; {'id': '104', 'type': 'if_statement', 'children': ['105', '112']}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '107', 'type': 'argument_list', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '111', 'type': 'string', 'children': [], 'value': '"xonxoff"'}; {'id': '112', 'type': 'block', 'children': ['113', '121']}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'call', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '120']}; {'id': '119', 'type': 'string', 'children': [], 'value': '"XON/XOFF"'}; {'id': '120', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'call', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'attribute', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'xonxoff'}; {'id': '132', 'type': 'if_statement', 'children': ['133', '140']}; {'id': '133', 'type': 'call', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '135', 'type': 'argument_list', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '139', 'type': 'string', 'children': [], 'value': '"timeout"'}; {'id': '140', 'type': 'block', 'children': ['141', '149']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'call', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '146', 'type': 'argument_list', 'children': ['147', '148']}; {'id': '147', 'type': 'string', 'children': [], 'value': '"Timeout"'}; {'id': '148', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '154']}; {'id': '151', 'type': 'attribute', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '154', 'type': 'argument_list', 'children': ['155']}; {'id': '155', 'type': 'attribute', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'timeout'}; {'id': '160', 'type': 'if_statement', 'children': ['161', '168']}; {'id': '161', 'type': 'call', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '163', 'type': 'argument_list', 'children': ['164', '167']}; {'id': '164', 'type': 'attribute', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '167', 'type': 'string', 'children': [], 'value': '"rtscts"'}; {'id': '168', 'type': 'block', 'children': ['169', '177']}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'call', 'children': ['171', '174']}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '174', 'type': 'argument_list', 'children': ['175', '176']}; {'id': '175', 'type': 'string', 'children': [], 'value': '"RTSCTS"'}; {'id': '176', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'call', 'children': ['179', '182']}; {'id': '179', 'type': 'attribute', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'attribute', 'children': ['184', '187']}; {'id': '184', 'type': 'attribute', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'rtscts'}; {'id': '188', 'type': 'if_statement', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '192', 'type': 'block', 'children': ['193', '201']}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'call', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'add_column'}; {'id': '198', 'type': 'argument_list', 'children': ['199', '200']}; {'id': '199', 'type': 'string', 'children': [], 'value': '"Location"'}; {'id': '200', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'call', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '206', 'type': 'argument_list', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'string', 'children': [], 'value': '"X = {}, Y = {}"'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '211', 'type': 'argument_list', 'children': ['212', '217']}; {'id': '212', 'type': 'attribute', 'children': ['213', '216']}; {'id': '213', 'type': 'attribute', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'x_coord'}; {'id': '217', 'type': 'attribute', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'y_coord'}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'call', 'children': ['224', '229']}; {'id': '224', 'type': 'attribute', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'start_string'}; {'id': '231', 'type': 'expression_statement', 'children': ['232']}; {'id': '232', 'type': 'call', 'children': ['233', '238']}; {'id': '233', 'type': 'attribute', 'children': ['234', '237']}; {'id': '234', 'type': 'attribute', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '238', 'type': 'argument_list', 'children': ['239']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'info_string'}; {'id': '240', 'type': 'expression_statement', 'children': ['241']}; {'id': '241', 'type': 'call', 'children': ['242', '245']}; {'id': '242', 'type': 'attribute', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'add_row'}; {'id': '245', 'type': 'argument_list', 'children': ['246']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '247', 'type': 'expression_statement', 'children': ['248']}; {'id': '248', 'type': 'call', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '250', 'type': 'argument_list', 'children': ['251']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'table'} | Prints Dut information nicely formatted into a table. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_itemize'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '5', 'type': 'block', 'children': ['6', '21', '35']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '15']}; {'id': '7', 'type': 'not_operator', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '10', 'type': 'argument_list', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'Sequence'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'raise_statement', 'children': ['17']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'string', 'children': [], 'value': '"expected a sequence of Function"'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'isseq'}; {'id': '24', 'type': 'list_comprehension', 'children': ['25', '32']}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '27', 'type': 'argument_list', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'Sequence'}; {'id': '32', 'type': 'for_in_clause', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '35', 'type': 'if_statement', 'children': ['36', '41', '122', '215']}; {'id': '36', 'type': 'not_operator', 'children': ['37']}; {'id': '37', 'type': 'call', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'any'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'isseq'}; {'id': '41', 'type': 'block', 'children': ['42', '46', '108']}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'assignment', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '45', 'type': 'None', 'children': []}; {'id': '46', 'type': 'for_statement', 'children': ['47', '48', '49']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'if_statement', 'children': ['51', '54', '95']}; {'id': '51', 'type': 'comparison_operator', 'children': ['52', '53'], 'value': 'is'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '53', 'type': 'None', 'children': []}; {'id': '54', 'type': 'block', 'children': ['55']}; {'id': '55', 'type': 'if_statement', 'children': ['56', '61', '66', '77', '88']}; {'id': '56', 'type': 'call', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '58', 'type': 'argument_list', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'BinaryDecisionDiagram'}; {'id': '61', 'type': 'block', 'children': ['62']}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'assignment', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'BinaryDecisionDiagram'}; {'id': '66', 'type': 'elif_clause', 'children': ['67', '72']}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '69', 'type': 'argument_list', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'Expression'}; {'id': '72', 'type': 'block', 'children': ['73']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'Expression'}; {'id': '77', 'type': 'elif_clause', 'children': ['78', '83']}; {'id': '78', 'type': 'call', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '80', 'type': 'argument_list', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'TruthTable'}; {'id': '83', 'type': 'block', 'children': ['84']}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'TruthTable'}; {'id': '88', 'type': 'else_clause', 'children': ['89']}; {'id': '89', 'type': 'block', 'children': ['90']}; {'id': '90', 'type': 'raise_statement', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'string', 'children': [], 'value': '"expected valid Function inputs"'}; {'id': '95', 'type': 'elif_clause', 'children': ['96', '102']}; {'id': '96', 'type': 'not_operator', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '99', 'type': 'argument_list', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'raise_statement', 'children': ['104']}; {'id': '104', 'type': 'call', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'string', 'children': [], 'value': '"expected uniform Function types"'}; {'id': '108', 'type': 'return_statement', 'children': ['109']}; {'id': '109', 'type': 'expression_list', 'children': ['110', '114', '121']}; {'id': '110', 'type': 'call', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '112', 'type': 'argument_list', 'children': ['113']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '114', 'type': 'tuple', 'children': ['115']}; {'id': '115', 'type': 'tuple', 'children': ['116', '117']}; {'id': '116', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '117', 'type': 'call', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '122', 'type': 'elif_clause', 'children': ['123', '127']}; {'id': '123', 'type': 'call', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'all'}; {'id': '125', 'type': 'argument_list', 'children': ['126']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'isseq'}; {'id': '127', 'type': 'block', 'children': ['128', '134', '138', '142', '198', '210']}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'assignment', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '131', 'type': 'call', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '133', 'type': 'argument_list', 'children': []}; {'id': '134', 'type': 'expression_statement', 'children': ['135']}; {'id': '135', 'type': 'assignment', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '137', 'type': 'None', 'children': []}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '141', 'type': 'None', 'children': []}; {'id': '142', 'type': 'for_statement', 'children': ['143', '144', '145']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '145', 'type': 'block', 'children': ['146', '156', '175', '194']}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '152']}; {'id': '148', 'type': 'pattern_list', 'children': ['149', '150', '151']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': '_items'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': '_shape'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': '_ftype'}; {'id': '152', 'type': 'call', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': '_itemize'}; {'id': '154', 'type': 'argument_list', 'children': ['155']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '156', 'type': 'if_statement', 'children': ['157', '160', '165']}; {'id': '157', 'type': 'comparison_operator', 'children': ['158', '159'], 'value': 'is'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '159', 'type': 'None', 'children': []}; {'id': '160', 'type': 'block', 'children': ['161']}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'assignment', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': '_shape'}; {'id': '165', 'type': 'elif_clause', 'children': ['166', '169']}; {'id': '166', 'type': 'comparison_operator', 'children': ['167', '168'], 'value': '!='}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': '_shape'}; {'id': '169', 'type': 'block', 'children': ['170']}; {'id': '170', 'type': 'raise_statement', 'children': ['171']}; {'id': '171', 'type': 'call', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'string', 'children': [], 'value': '"expected uniform farray dimensions"'}; {'id': '175', 'type': 'if_statement', 'children': ['176', '179', '184']}; {'id': '176', 'type': 'comparison_operator', 'children': ['177', '178'], 'value': 'is'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '178', 'type': 'None', 'children': []}; {'id': '179', 'type': 'block', 'children': ['180']}; {'id': '180', 'type': 'expression_statement', 'children': ['181']}; {'id': '181', 'type': 'assignment', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': '_ftype'}; {'id': '184', 'type': 'elif_clause', 'children': ['185', '188']}; {'id': '185', 'type': 'comparison_operator', 'children': ['186', '187'], 'value': '!='}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': '_ftype'}; {'id': '188', 'type': 'block', 'children': ['189']}; {'id': '189', 'type': 'raise_statement', 'children': ['190']}; {'id': '190', 'type': 'call', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '192', 'type': 'argument_list', 'children': ['193']}; {'id': '193', 'type': 'string', 'children': [], 'value': '"expected uniform Function types"'}; {'id': '194', 'type': 'expression_statement', 'children': ['195']}; {'id': '195', 'type': 'augmented_assignment', 'children': ['196', '197'], 'value': '+='}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': '_items'}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '201', 'type': 'binary_operator', 'children': ['202', '209'], 'value': '+'}; {'id': '202', 'type': 'tuple', 'children': ['203']}; {'id': '203', 'type': 'tuple', 'children': ['204', '205']}; {'id': '204', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '205', 'type': 'call', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'objs'}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '210', 'type': 'return_statement', 'children': ['211']}; {'id': '211', 'type': 'expression_list', 'children': ['212', '213', '214']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'ftype'}; {'id': '215', 'type': 'else_clause', 'children': ['216']}; {'id': '216', 'type': 'block', 'children': ['217']}; {'id': '217', 'type': 'raise_statement', 'children': ['218']}; {'id': '218', 'type': 'call', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '220', 'type': 'argument_list', 'children': ['221']}; {'id': '221', 'type': 'string', 'children': [], 'value': '"expected uniform farray dimensions"'} | Recursive helper function for farray. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_filtdim'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '8', 'type': 'block', 'children': ['9', '23', '30', '36', '52', '61', '67', '341']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'normshape'}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '14', 'type': 'generator_expression', 'children': ['15', '18']}; {'id': '15', 'type': 'binary_operator', 'children': ['16', '17'], 'value': '-'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '18', 'type': 'for_in_clause', 'children': ['19', '22']}; {'id': '19', 'type': 'pattern_list', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'nsl_type'}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'newitems'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '35', 'type': 'argument_list', 'children': []}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'reduce'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'operator'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'mul'}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'normshape'}; {'id': '47', 'type': 'slice', 'children': ['48', '49']}; {'id': '48', 'type': 'colon', 'children': []}; {'id': '49', 'type': 'binary_operator', 'children': ['50', '51'], 'value': '+'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '51', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '55', 'type': 'binary_operator', 'children': ['56', '60'], 'value': '//'}; {'id': '56', 'type': 'call', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '64', 'type': 'subscript', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'normshape'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '67', 'type': 'if_statement', 'children': ['68', '71', '118', '200']}; {'id': '68', 'type': 'comparison_operator', 'children': ['69', '70'], 'value': 'is'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'nsl_type'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '71', 'type': 'block', 'children': ['72', '102']}; {'id': '72', 'type': 'for_statement', 'children': ['73', '74', '78']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '78', 'type': 'block', 'children': ['79']}; {'id': '79', 'type': 'if_statement', 'children': ['80', '85']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '84'], 'value': '=='}; {'id': '81', 'type': 'binary_operator', 'children': ['82', '83'], 'value': '%'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '85', 'type': 'block', 'children': ['86']}; {'id': '86', 'type': 'expression_statement', 'children': ['87']}; {'id': '87', 'type': 'augmented_assignment', 'children': ['88', '89'], 'value': '+='}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'newitems'}; {'id': '89', 'type': 'subscript', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '91', 'type': 'slice', 'children': ['92', '95', '96']}; {'id': '92', 'type': 'binary_operator', 'children': ['93', '94'], 'value': '*'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '95', 'type': 'colon', 'children': []}; {'id': '96', 'type': 'binary_operator', 'children': ['97', '98'], 'value': '*'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '98', 'type': '()', 'children': ['99']}; {'id': '99', 'type': 'binary_operator', 'children': ['100', '101'], 'value': '+'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '101', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'assignment', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'newshape'}; {'id': '105', 'type': 'binary_operator', 'children': ['106', '111'], 'value': '+'}; {'id': '106', 'type': 'subscript', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '108', 'type': 'slice', 'children': ['109', '110']}; {'id': '109', 'type': 'colon', 'children': []}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '111', 'type': 'subscript', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '113', 'type': 'slice', 'children': ['114', '117']}; {'id': '114', 'type': 'binary_operator', 'children': ['115', '116'], 'value': '+'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '116', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '117', 'type': 'colon', 'children': []}; {'id': '118', 'type': 'elif_clause', 'children': ['119', '122']}; {'id': '119', 'type': 'comparison_operator', 'children': ['120', '121'], 'value': 'is'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'nsl_type'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'slice'}; {'id': '122', 'type': 'block', 'children': ['123', '159', '167', '181']}; {'id': '123', 'type': 'for_statement', 'children': ['124', '125', '129']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '125', 'type': 'call', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '129', 'type': 'block', 'children': ['130']}; {'id': '130', 'type': 'if_statement', 'children': ['131', '142']}; {'id': '131', 'type': 'comparison_operator', 'children': ['132', '135', '139'], 'value': '<='}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '135', 'type': '()', 'children': ['136']}; {'id': '136', 'type': 'binary_operator', 'children': ['137', '138'], 'value': '%'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '142', 'type': 'block', 'children': ['143']}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'augmented_assignment', 'children': ['145', '146'], 'value': '+='}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'newitems'}; {'id': '146', 'type': 'subscript', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '148', 'type': 'slice', 'children': ['149', '152', '153']}; {'id': '149', 'type': 'binary_operator', 'children': ['150', '151'], 'value': '*'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '152', 'type': 'colon', 'children': []}; {'id': '153', 'type': 'binary_operator', 'children': ['154', '155'], 'value': '*'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '155', 'type': '()', 'children': ['156']}; {'id': '156', 'type': 'binary_operator', 'children': ['157', '158'], 'value': '+'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '158', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'assignment', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '162', 'type': 'subscript', 'children': ['163', '166']}; {'id': '163', 'type': 'subscript', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '166', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '167', 'type': 'expression_statement', 'children': ['168']}; {'id': '168', 'type': 'assignment', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'redim'}; {'id': '170', 'type': 'tuple', 'children': ['171', '176']}; {'id': '171', 'type': 'binary_operator', 'children': ['172', '173'], 'value': '+'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '176', 'type': 'binary_operator', 'children': ['177', '178'], 'value': '+'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '181', 'type': 'expression_statement', 'children': ['182']}; {'id': '182', 'type': 'assignment', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'newshape'}; {'id': '184', 'type': 'binary_operator', 'children': ['185', '193'], 'value': '+'}; {'id': '185', 'type': 'binary_operator', 'children': ['186', '191'], 'value': '+'}; {'id': '186', 'type': 'subscript', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '188', 'type': 'slice', 'children': ['189', '190']}; {'id': '189', 'type': 'colon', 'children': []}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '191', 'type': 'tuple', 'children': ['192']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'redim'}; {'id': '193', 'type': 'subscript', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '195', 'type': 'slice', 'children': ['196', '199']}; {'id': '196', 'type': 'binary_operator', 'children': ['197', '198'], 'value': '+'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '198', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '199', 'type': 'colon', 'children': []}; {'id': '200', 'type': 'else_clause', 'children': ['201']}; {'id': '201', 'type': 'block', 'children': ['202', '233', '246', '273', '325']}; {'id': '202', 'type': 'if_statement', 'children': ['203', '211']}; {'id': '203', 'type': 'comparison_operator', 'children': ['204', '207'], 'value': '<'}; {'id': '204', 'type': 'attribute', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '207', 'type': 'call', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'clog2'}; {'id': '209', 'type': 'argument_list', 'children': ['210']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '211', 'type': 'block', 'children': ['212', '216']}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'fstr'}; {'id': '215', 'type': 'string', 'children': [], 'value': '"expected dim {} select to have >= {} bits, got {}"'}; {'id': '216', 'type': 'raise_statement', 'children': ['217']}; {'id': '217', 'type': 'call', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'call', 'children': ['221', '224']}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'fstr'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '224', 'type': 'argument_list', 'children': ['225', '226', '230']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '226', 'type': 'call', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'clog2'}; {'id': '228', 'type': 'argument_list', 'children': ['229']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '236', 'type': 'list_comprehension', 'children': ['237', '240']}; {'id': '237', 'type': 'call', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '239', 'type': 'argument_list', 'children': []}; {'id': '240', 'type': 'for_in_clause', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '242', 'type': 'call', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '244', 'type': 'argument_list', 'children': ['245']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '246', 'type': 'for_statement', 'children': ['247', '248', '252']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '248', 'type': 'call', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '250', 'type': 'argument_list', 'children': ['251']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '252', 'type': 'block', 'children': ['253']}; {'id': '253', 'type': 'expression_statement', 'children': ['254']}; {'id': '254', 'type': 'augmented_assignment', 'children': ['255', '260'], 'value': '+='}; {'id': '255', 'type': 'subscript', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '257', 'type': 'binary_operator', 'children': ['258', '259'], 'value': '%'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '260', 'type': 'subscript', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '262', 'type': 'slice', 'children': ['263', '266', '267']}; {'id': '263', 'type': 'binary_operator', 'children': ['264', '265'], 'value': '*'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '266', 'type': 'colon', 'children': []}; {'id': '267', 'type': 'binary_operator', 'children': ['268', '269'], 'value': '*'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '269', 'type': '()', 'children': ['270']}; {'id': '270', 'type': 'binary_operator', 'children': ['271', '272'], 'value': '+'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '272', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '273', 'type': 'for_statement', 'children': ['274', '275', '280']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'muxins'}; {'id': '275', 'type': 'call', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '277', 'type': 'argument_list', 'children': ['278']}; {'id': '278', 'type': 'list_splat', 'children': ['279']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '280', 'type': 'block', 'children': ['281', '292', '312']}; {'id': '281', 'type': 'expression_statement', 'children': ['282']}; {'id': '282', 'type': 'assignment', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'it'}; {'id': '284', 'type': 'call', 'children': ['285', '288']}; {'id': '285', 'type': 'attribute', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'boolfunc'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'iter_terms'}; {'id': '288', 'type': 'argument_list', 'children': ['289']}; {'id': '289', 'type': 'attribute', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'nsl'}; {'id': '291', 'type': 'identifier', 'children': [], 'value': '_items'}; {'id': '292', 'type': 'expression_statement', 'children': ['293']}; {'id': '293', 'type': 'assignment', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'xs'}; {'id': '295', 'type': 'list_comprehension', 'children': ['296', '309']}; {'id': '296', 'type': 'call', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'reduce'}; {'id': '298', 'type': 'argument_list', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'operator'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'and_'}; {'id': '302', 'type': 'binary_operator', 'children': ['303', '305'], 'value': '+'}; {'id': '303', 'type': 'tuple', 'children': ['304']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'muxin'}; {'id': '305', 'type': 'call', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'next'}; {'id': '307', 'type': 'argument_list', 'children': ['308']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'it'}; {'id': '309', 'type': 'for_in_clause', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'muxin'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'muxins'}; {'id': '312', 'type': 'expression_statement', 'children': ['313']}; {'id': '313', 'type': 'call', 'children': ['314', '317']}; {'id': '314', 'type': 'attribute', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'newitems'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '317', 'type': 'argument_list', 'children': ['318']}; {'id': '318', 'type': 'call', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'reduce'}; {'id': '320', 'type': 'argument_list', 'children': ['321', '324']}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'operator'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'or_'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'xs'}; {'id': '325', 'type': 'expression_statement', 'children': ['326']}; {'id': '326', 'type': 'assignment', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'newshape'}; {'id': '328', 'type': 'binary_operator', 'children': ['329', '334'], 'value': '+'}; {'id': '329', 'type': 'subscript', 'children': ['330', '331']}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '331', 'type': 'slice', 'children': ['332', '333']}; {'id': '332', 'type': 'colon', 'children': []}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '334', 'type': 'subscript', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'shape'}; {'id': '336', 'type': 'slice', 'children': ['337', '340']}; {'id': '337', 'type': 'binary_operator', 'children': ['338', '339'], 'value': '+'}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'dim'}; {'id': '339', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '340', 'type': 'colon', 'children': []}; {'id': '341', 'type': 'return_statement', 'children': ['342']}; {'id': '342', 'type': 'expression_list', 'children': ['343', '344']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'newitems'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'newshape'} | Return items, shape filtered by a dimension slice. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_apply_sub_frames'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'subs'}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'for_statement', 'children': ['9', '12', '17']}; {'id': '9', 'type': 'pattern_list', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'subs'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'block', 'children': ['18', '22', '26', '61', '65', '238']}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '21', 'type': 'None', 'children': []}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'expect_map'}; {'id': '25', 'type': 'False', 'children': []}; {'id': '26', 'type': 'if_statement', 'children': ['27', '30', '40', '58']}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '29'], 'value': 'in'}; {'id': '28', 'type': 'string', 'children': [], 'value': "'$sub'"}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'string', 'children': [], 'value': "'$sub'"}; {'id': '40', 'type': 'elif_clause', 'children': ['41', '44']}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': 'in'}; {'id': '42', 'type': 'string', 'children': [], 'value': "'$sub.'"}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '44', 'type': 'block', 'children': ['45', '54']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '48', 'type': 'call', 'children': ['49', '52']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'string', 'children': [], 'value': "'$sub.'"}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'assignment', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'expect_map'}; {'id': '57', 'type': 'True', 'children': []}; {'id': '58', 'type': 'else_clause', 'children': ['59']}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'continue_statement', 'children': []}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'raw_subs'}; {'id': '64', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '65', 'type': 'for_statement', 'children': ['66', '67', '68']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '68', 'type': 'block', 'children': ['69', '79', '85', '201', '205', '214', '229']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': '_path_to_value'}; {'id': '76', 'type': 'argument_list', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '79', 'type': 'if_statement', 'children': ['80', '83']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '82'], 'value': 'is'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '82', 'type': 'None', 'children': []}; {'id': '83', 'type': 'block', 'children': ['84']}; {'id': '84', 'type': 'continue_statement', 'children': []}; {'id': '85', 'type': 'if_statement', 'children': ['86', '91', '166', '194']}; {'id': '86', 'type': 'call', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '88', 'type': 'argument_list', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '91', 'type': 'block', 'children': ['92']}; {'id': '92', 'type': 'if_statement', 'children': ['93', '94', '150']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'expect_map'}; {'id': '94', 'type': 'block', 'children': ['95', '103']}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'augmented_assignment', 'children': ['97', '98'], 'value': '+='}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'raw_subs'}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '102', 'type': 'argument_list', 'children': []}; {'id': '103', 'type': 'for_statement', 'children': ['104', '107', '112']}; {'id': '104', 'type': 'pattern_list', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '111', 'type': 'argument_list', 'children': []}; {'id': '112', 'type': 'block', 'children': ['113']}; {'id': '113', 'type': 'if_statement', 'children': ['114', '119', '139']}; {'id': '114', 'type': 'call', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '116', 'type': 'argument_list', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '125']}; {'id': '122', 'type': 'subscript', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '125', 'type': 'list_comprehension', 'children': ['126', '130', '133']}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '130', 'type': 'for_in_clause', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '133', 'type': 'if_clause', 'children': ['134']}; {'id': '134', 'type': 'call', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '136', 'type': 'argument_list', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '139', 'type': 'else_clause', 'children': ['140']}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '146']}; {'id': '143', 'type': 'subscript', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '146', 'type': 'call', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '150', 'type': 'else_clause', 'children': ['151']}; {'id': '151', 'type': 'block', 'children': ['152', '159']}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'call', 'children': ['154', '157']}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'raw_subs'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'assignment', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '162', 'type': 'call', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '166', 'type': 'elif_clause', 'children': ['167', '172']}; {'id': '167', 'type': 'call', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '169', 'type': 'argument_list', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '172', 'type': 'block', 'children': ['173', '177']}; {'id': '173', 'type': 'expression_statement', 'children': ['174']}; {'id': '174', 'type': 'augmented_assignment', 'children': ['175', '176'], 'value': '+='}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'raw_subs'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '180', 'type': 'list_comprehension', 'children': ['181', '185', '188']}; {'id': '181', 'type': 'call', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '183', 'type': 'argument_list', 'children': ['184']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '185', 'type': 'for_in_clause', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '188', 'type': 'if_clause', 'children': ['189']}; {'id': '189', 'type': 'call', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '191', 'type': 'argument_list', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '194', 'type': 'else_clause', 'children': ['195']}; {'id': '195', 'type': 'block', 'children': ['196']}; {'id': '196', 'type': 'raise_statement', 'children': ['197']}; {'id': '197', 'type': 'call', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '199', 'type': 'argument_list', 'children': ['200']}; {'id': '200', 'type': 'string', 'children': [], 'value': "'Not a supported sub-frame type'"}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'assignment', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '205', 'type': 'expression_statement', 'children': ['206']}; {'id': '206', 'type': 'assignment', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '208', 'type': 'call', 'children': ['209', '212']}; {'id': '209', 'type': 'attribute', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': '_path_to_keys'}; {'id': '212', 'type': 'argument_list', 'children': ['213']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '214', 'type': 'for_statement', 'children': ['215', '216', '222']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '216', 'type': 'subscript', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '218', 'type': 'slice', 'children': ['219', '220']}; {'id': '219', 'type': 'colon', 'children': []}; {'id': '220', 'type': 'unary_operator', 'children': ['221'], 'value': '-'}; {'id': '221', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '222', 'type': 'block', 'children': ['223']}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'assignment', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '226', 'type': 'subscript', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '229', 'type': 'expression_statement', 'children': ['230']}; {'id': '230', 'type': 'assignment', 'children': ['231', '237']}; {'id': '231', 'type': 'subscript', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '233', 'type': 'subscript', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '235', 'type': 'unary_operator', 'children': ['236'], 'value': '-'}; {'id': '236', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '238', 'type': 'if_statement', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '240', 'type': 'block', 'children': ['241']}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'call', 'children': ['243', '246']}; {'id': '243', 'type': 'attribute', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': '_apply_projection'}; {'id': '246', 'type': 'argument_list', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'raw_subs'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'projection'} | Convert embedded documents to sub-frames for one or more documents |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_dereference'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'references'}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'for_statement', 'children': ['9', '12', '17']}; {'id': '9', 'type': 'pattern_list', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'references'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'block', 'children': ['18', '24', '30', '90', '99', '120', '132']}; {'id': '18', 'type': 'if_statement', 'children': ['19', '22']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '21'], 'value': 'not'}; {'id': '20', 'type': 'string', 'children': [], 'value': "'$ref'"}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '22', 'type': 'block', 'children': ['23']}; {'id': '23', 'type': 'continue_statement', 'children': []}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'ids'}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '29', 'type': 'argument_list', 'children': []}; {'id': '30', 'type': 'for_statement', 'children': ['31', '32', '33']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '33', 'type': 'block', 'children': ['34', '44', '49']}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'assignment', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': '_path_to_value'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '44', 'type': 'if_statement', 'children': ['45', '47']}; {'id': '45', 'type': 'not_operator', 'children': ['46']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'continue_statement', 'children': []}; {'id': '49', 'type': 'if_statement', 'children': ['50', '55', '63', '81']}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '52', 'type': 'argument_list', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '55', 'type': 'block', 'children': ['56']}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '61']}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'ids'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '63', 'type': 'elif_clause', 'children': ['64', '69']}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '66', 'type': 'argument_list', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '69', 'type': 'block', 'children': ['70']}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'call', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'ids'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '80', 'type': 'argument_list', 'children': []}; {'id': '81', 'type': 'else_clause', 'children': ['82']}; {'id': '82', 'type': 'block', 'children': ['83']}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'call', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'ids'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '88', 'type': 'argument_list', 'children': ['89']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'assignment', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'ref'}; {'id': '93', 'type': 'call', 'children': ['94', '97']}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '97', 'type': 'argument_list', 'children': ['98']}; {'id': '98', 'type': 'string', 'children': [], 'value': "'$ref'"}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '102', 'type': 'call', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'ref'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'many'}; {'id': '106', 'type': 'argument_list', 'children': ['107', '117']}; {'id': '107', 'type': 'dictionary', 'children': ['108']}; {'id': '108', 'type': 'pair', 'children': ['109', '110']}; {'id': '109', 'type': 'string', 'children': [], 'value': "'_id'"}; {'id': '110', 'type': 'dictionary', 'children': ['111']}; {'id': '111', 'type': 'pair', 'children': ['112', '113']}; {'id': '112', 'type': 'string', 'children': [], 'value': "'$in'"}; {'id': '113', 'type': 'call', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '115', 'type': 'argument_list', 'children': ['116']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'ids'}; {'id': '117', 'type': 'keyword_argument', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'projection'}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '123', 'type': 'dictionary_comprehension', 'children': ['124', '129']}; {'id': '124', 'type': 'pair', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': '_id'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '129', 'type': 'for_in_clause', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '132', 'type': 'for_statement', 'children': ['133', '134', '135']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '135', 'type': 'block', 'children': ['136', '146', '151', '212', '216', '225', '240']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '139', 'type': 'call', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': '_path_to_value'}; {'id': '143', 'type': 'argument_list', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '146', 'type': 'if_statement', 'children': ['147', '149']}; {'id': '147', 'type': 'not_operator', 'children': ['148']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'continue_statement', 'children': []}; {'id': '151', 'type': 'if_statement', 'children': ['152', '157', '172', '200']}; {'id': '152', 'type': 'call', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '154', 'type': 'argument_list', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'assignment', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '161', 'type': 'list_comprehension', 'children': ['162', '165', '168']}; {'id': '162', 'type': 'subscript', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '165', 'type': 'for_in_clause', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '168', 'type': 'if_clause', 'children': ['169']}; {'id': '169', 'type': 'comparison_operator', 'children': ['170', '171'], 'value': 'in'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '172', 'type': 'elif_clause', 'children': ['173', '178']}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '175', 'type': 'argument_list', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '178', 'type': 'block', 'children': ['179']}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '182', 'type': 'dictionary_comprehension', 'children': ['183', '191']}; {'id': '183', 'type': 'pair', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '189', 'type': 'argument_list', 'children': ['190']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '191', 'type': 'for_in_clause', 'children': ['192', '195']}; {'id': '192', 'type': 'pattern_list', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '195', 'type': 'call', 'children': ['196', '199']}; {'id': '196', 'type': 'attribute', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '199', 'type': 'argument_list', 'children': []}; {'id': '200', 'type': 'else_clause', 'children': ['201']}; {'id': '201', 'type': 'block', 'children': ['202']}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'assignment', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '205', 'type': 'call', 'children': ['206', '209']}; {'id': '206', 'type': 'attribute', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'frames'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '209', 'type': 'argument_list', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '211', 'type': 'None', 'children': []}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'document'}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'assignment', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '219', 'type': 'call', 'children': ['220', '223']}; {'id': '220', 'type': 'attribute', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': '_path_to_keys'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '225', 'type': 'for_statement', 'children': ['226', '227', '233']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '227', 'type': 'subscript', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '229', 'type': 'slice', 'children': ['230', '231']}; {'id': '230', 'type': 'colon', 'children': []}; {'id': '231', 'type': 'unary_operator', 'children': ['232'], 'value': '-'}; {'id': '232', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '233', 'type': 'block', 'children': ['234']}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'assignment', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '237', 'type': 'subscript', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '240', 'type': 'expression_statement', 'children': ['241']}; {'id': '241', 'type': 'assignment', 'children': ['242', '248']}; {'id': '242', 'type': 'subscript', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'child_document'}; {'id': '244', 'type': 'subscript', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '246', 'type': 'unary_operator', 'children': ['247'], 'value': '-'}; {'id': '247', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'value'} | Dereference one or more documents |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'diff_to_html'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '17', '63', '76', '139', '152', '256', '269', '332']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'changes'}; {'id': '10', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '11', 'type': 'if_statement', 'children': ['12', '14']}; {'id': '12', 'type': 'not_operator', 'children': ['13']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'return_statement', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': "''"}; {'id': '17', 'type': 'function_definition', 'children': ['18', '19', '21']}; {'id': '18', 'type': 'function_name', 'children': [], 'value': '_frame'}; {'id': '19', 'type': 'parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '21', 'type': 'block', 'children': ['22', '58']}; {'id': '22', 'type': 'if_statement', 'children': ['23', '32', '37']}; {'id': '23', 'type': 'boolean_operator', 'children': ['24', '29'], 'value': 'and'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '29', 'type': 'comparison_operator', 'children': ['30', '31'], 'value': 'in'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'_str'"}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'return_statement', 'children': ['34']}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '36', 'type': 'string', 'children': [], 'value': "'_str'"}; {'id': '37', 'type': 'elif_clause', 'children': ['38', '43']}; {'id': '38', 'type': 'call', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '43', 'type': 'block', 'children': ['44']}; {'id': '44', 'type': 'return_statement', 'children': ['45']}; {'id': '45', 'type': 'call', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'list_comprehension', 'children': ['51', '55']}; {'id': '51', 'type': 'call', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '55', 'type': 'for_in_clause', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '58', 'type': 'return_statement', 'children': ['59']}; {'id': '59', 'type': 'call', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'call', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '73', 'type': 'argument_list', 'children': ['74', '75']}; {'id': '74', 'type': 'string', 'children': [], 'value': "'additions'"}; {'id': '75', 'type': 'dictionary', 'children': []}; {'id': '76', 'type': 'for_statement', 'children': ['77', '78', '79']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '79', 'type': 'block', 'children': ['80', '91', '114', '132']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '83', 'type': 'call', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'subscript', 'children': ['87', '90']}; {'id': '87', 'type': 'subscript', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '89', 'type': 'string', 'children': [], 'value': "'additions'"}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '91', 'type': 'if_statement', 'children': ['92', '97']}; {'id': '92', 'type': 'call', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '94', 'type': 'argument_list', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '97', 'type': 'block', 'children': ['98']}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'list_comprehension', 'children': ['107', '111']}; {'id': '107', 'type': 'call', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '111', 'type': 'for_in_clause', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'assignment', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '117', 'type': 'call', 'children': ['118', '125']}; {'id': '118', 'type': 'attribute', 'children': ['119', '124']}; {'id': '119', 'type': 'subscript', 'children': ['120', '123']}; {'id': '120', 'type': 'attribute', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': '_templates'}; {'id': '123', 'type': 'string', 'children': [], 'value': "'add'"}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '125', 'type': 'argument_list', 'children': ['126', '129']}; {'id': '126', 'type': 'keyword_argument', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '129', 'type': 'keyword_argument', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'call', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'changes'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '139', 'type': 'expression_statement', 'children': ['140']}; {'id': '140', 'type': 'assignment', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '142', 'type': 'call', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '144', 'type': 'argument_list', 'children': ['145']}; {'id': '145', 'type': 'call', 'children': ['146', '149']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '149', 'type': 'argument_list', 'children': ['150', '151']}; {'id': '150', 'type': 'string', 'children': [], 'value': "'updates'"}; {'id': '151', 'type': 'dictionary', 'children': []}; {'id': '152', 'type': 'for_statement', 'children': ['153', '154', '155']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '155', 'type': 'block', 'children': ['156', '169', '192', '205', '228', '249']}; {'id': '156', 'type': 'expression_statement', 'children': ['157']}; {'id': '157', 'type': 'assignment', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'subscript', 'children': ['163', '168']}; {'id': '163', 'type': 'subscript', 'children': ['164', '167']}; {'id': '164', 'type': 'subscript', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '166', 'type': 'string', 'children': [], 'value': "'updates'"}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '168', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '169', 'type': 'if_statement', 'children': ['170', '175']}; {'id': '170', 'type': 'call', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '172', 'type': 'argument_list', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '175', 'type': 'block', 'children': ['176']}; {'id': '176', 'type': 'expression_statement', 'children': ['177']}; {'id': '177', 'type': 'assignment', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '179', 'type': 'call', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '183', 'type': 'argument_list', 'children': ['184']}; {'id': '184', 'type': 'list_comprehension', 'children': ['185', '189']}; {'id': '185', 'type': 'call', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '187', 'type': 'argument_list', 'children': ['188']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '189', 'type': 'for_in_clause', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '192', 'type': 'expression_statement', 'children': ['193']}; {'id': '193', 'type': 'assignment', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '195', 'type': 'call', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '197', 'type': 'argument_list', 'children': ['198']}; {'id': '198', 'type': 'subscript', 'children': ['199', '204']}; {'id': '199', 'type': 'subscript', 'children': ['200', '203']}; {'id': '200', 'type': 'subscript', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '202', 'type': 'string', 'children': [], 'value': "'updates'"}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '204', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '205', 'type': 'if_statement', 'children': ['206', '211']}; {'id': '206', 'type': 'call', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '208', 'type': 'argument_list', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '211', 'type': 'block', 'children': ['212']}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '215', 'type': 'call', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'list_comprehension', 'children': ['221', '225']}; {'id': '221', 'type': 'call', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '225', 'type': 'for_in_clause', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'assignment', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '231', 'type': 'call', 'children': ['232', '239']}; {'id': '232', 'type': 'attribute', 'children': ['233', '238']}; {'id': '233', 'type': 'subscript', 'children': ['234', '237']}; {'id': '234', 'type': 'attribute', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': '_templates'}; {'id': '237', 'type': 'string', 'children': [], 'value': "'update'"}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '239', 'type': 'argument_list', 'children': ['240', '243', '246']}; {'id': '240', 'type': 'keyword_argument', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '243', 'type': 'keyword_argument', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '246', 'type': 'keyword_argument', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'new_value'}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'call', 'children': ['251', '254']}; {'id': '251', 'type': 'attribute', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'changes'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '254', 'type': 'argument_list', 'children': ['255']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '256', 'type': 'expression_statement', 'children': ['257']}; {'id': '257', 'type': 'assignment', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '259', 'type': 'call', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '261', 'type': 'argument_list', 'children': ['262']}; {'id': '262', 'type': 'call', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '266', 'type': 'argument_list', 'children': ['267', '268']}; {'id': '267', 'type': 'string', 'children': [], 'value': "'deletions'"}; {'id': '268', 'type': 'dictionary', 'children': []}; {'id': '269', 'type': 'for_statement', 'children': ['270', '271', '272']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '272', 'type': 'block', 'children': ['273', '284', '307', '325']}; {'id': '273', 'type': 'expression_statement', 'children': ['274']}; {'id': '274', 'type': 'assignment', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '276', 'type': 'call', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '278', 'type': 'argument_list', 'children': ['279']}; {'id': '279', 'type': 'subscript', 'children': ['280', '283']}; {'id': '280', 'type': 'subscript', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '282', 'type': 'string', 'children': [], 'value': "'deletions'"}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '284', 'type': 'if_statement', 'children': ['285', '290']}; {'id': '285', 'type': 'call', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '287', 'type': 'argument_list', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '290', 'type': 'block', 'children': ['291']}; {'id': '291', 'type': 'expression_statement', 'children': ['292']}; {'id': '292', 'type': 'assignment', 'children': ['293', '294']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '294', 'type': 'call', 'children': ['295', '298']}; {'id': '295', 'type': 'attribute', 'children': ['296', '297']}; {'id': '296', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '298', 'type': 'argument_list', 'children': ['299']}; {'id': '299', 'type': 'list_comprehension', 'children': ['300', '304']}; {'id': '300', 'type': 'call', 'children': ['301', '302']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': '_frame'}; {'id': '302', 'type': 'argument_list', 'children': ['303']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '304', 'type': 'for_in_clause', 'children': ['305', '306']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '307', 'type': 'expression_statement', 'children': ['308']}; {'id': '308', 'type': 'assignment', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '310', 'type': 'call', 'children': ['311', '318']}; {'id': '311', 'type': 'attribute', 'children': ['312', '317']}; {'id': '312', 'type': 'subscript', 'children': ['313', '316']}; {'id': '313', 'type': 'attribute', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '315', 'type': 'identifier', 'children': [], 'value': '_templates'}; {'id': '316', 'type': 'string', 'children': [], 'value': "'delete'"}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '318', 'type': 'argument_list', 'children': ['319', '322']}; {'id': '319', 'type': 'keyword_argument', 'children': ['320', '321']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '322', 'type': 'keyword_argument', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'original_value'}; {'id': '325', 'type': 'expression_statement', 'children': ['326']}; {'id': '326', 'type': 'call', 'children': ['327', '330']}; {'id': '327', 'type': 'attribute', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'changes'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '330', 'type': 'argument_list', 'children': ['331']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '332', 'type': 'return_statement', 'children': ['333']}; {'id': '333', 'type': 'call', 'children': ['334', '337']}; {'id': '334', 'type': 'attribute', 'children': ['335', '336']}; {'id': '335', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '337', 'type': 'argument_list', 'children': ['338']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'changes'} | Return an entry's details in HTML format |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'SortBy'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'list_splat_pattern', 'children': ['5']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'qs'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '54']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '10', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '11', 'type': 'for_statement', 'children': ['12', '13', '14']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'qs'}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'if_statement', 'children': ['16', '24', '41']}; {'id': '16', 'type': 'call', 'children': ['17', '22']}; {'id': '17', 'type': 'attribute', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': '_path'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'endswith'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'string', 'children': [], 'value': "'.desc'"}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'call', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'tuple', 'children': ['32', '40']}; {'id': '32', 'type': 'subscript', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': '_path'}; {'id': '36', 'type': 'slice', 'children': ['37', '38']}; {'id': '37', 'type': 'colon', 'children': []}; {'id': '38', 'type': 'unary_operator', 'children': ['39'], 'value': '-'}; {'id': '39', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'DESCENDING'}; {'id': '41', 'type': 'else_clause', 'children': ['42']}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'call', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'tuple', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': '_path'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'ASCENDING'}; {'id': '54', 'type': 'return_statement', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'sort'} | Convert a list of Q objects into list of sort instructions |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'refresh'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '9', '51', '65', '72', '141']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '8', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '9', 'type': 'for_statement', 'children': ['10', '11', '16']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'traceback'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'extract_stack'}; {'id': '15', 'type': 'argument_list', 'children': []}; {'id': '16', 'type': 'block', 'children': ['17', '38']}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '20', 'type': 'call', 'children': ['21', '26']}; {'id': '21', 'type': 'attribute', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '37']}; {'id': '27', 'type': 'call', 'children': ['28', '33']}; {'id': '28', 'type': 'attribute', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'dirname'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '36', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'OVERRIDE_FILE'}; {'id': '38', 'type': 'if_statement', 'children': ['39', '42']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '41'], 'value': 'not'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'call', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'insert'}; {'id': '48', 'type': 'argument_list', 'children': ['49', '50']}; {'id': '49', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '51', 'type': 'if_statement', 'children': ['52', '55']}; {'id': '52', 'type': 'comparison_operator', 'children': ['53', '54'], 'value': 'in'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'OVERRIDE_FILE'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '55', 'type': 'block', 'children': ['56']}; {'id': '56', 'type': 'delete_statement', 'children': ['57']}; {'id': '57', 'type': 'subscript', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '59', 'type': 'call', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'OVERRIDE_FILE'}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'call', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'OVERRIDE_FILE'}; {'id': '72', 'type': 'function_definition', 'children': ['73', '74', '76']}; {'id': '73', 'type': 'function_name', 'children': [], 'value': 'import_path'}; {'id': '74', 'type': 'parameters', 'children': ['75']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '76', 'type': 'block', 'children': ['77', '103', '107', '119', '130', '139']}; {'id': '77', 'type': 'if_statement', 'children': ['78', '86']}; {'id': '78', 'type': 'comparison_operator', 'children': ['79', '82'], 'value': '<'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'version_info'}; {'id': '82', 'type': 'tuple', 'children': ['83', '84', '85']}; {'id': '83', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '84', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '85', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '86', 'type': 'block', 'children': ['87', '93']}; {'id': '87', 'type': 'import_from_statement', 'children': ['88', '91']}; {'id': '88', 'type': 'dotted_name', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'importlib'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'machinery'}; {'id': '91', 'type': 'dotted_name', 'children': ['92']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'SourceFileLoader'}; {'id': '93', 'type': 'return_statement', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '102']}; {'id': '95', 'type': 'attribute', 'children': ['96', '101']}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'SourceFileLoader'}; {'id': '98', 'type': 'argument_list', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': '__name__'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'load_module'}; {'id': '102', 'type': 'argument_list', 'children': []}; {'id': '103', 'type': 'import_statement', 'children': ['104']}; {'id': '104', 'type': 'dotted_name', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'importlib'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'util'}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'spec'}; {'id': '110', 'type': 'call', 'children': ['111', '116']}; {'id': '111', 'type': 'attribute', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'importlib'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'util'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'spec_from_file_location'}; {'id': '116', 'type': 'argument_list', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': '__name__'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '122', 'type': 'call', 'children': ['123', '128']}; {'id': '123', 'type': 'attribute', 'children': ['124', '127']}; {'id': '124', 'type': 'attribute', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'importlib'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'util'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'module_from_spec'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'spec'}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'call', 'children': ['132', '137']}; {'id': '132', 'type': 'attribute', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'spec'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'loader'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'exec_module'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '139', 'type': 'return_statement', 'children': ['140']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '141', 'type': 'for_statement', 'children': ['142', '143', '144']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'override_file'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'override_files'}; {'id': '144', 'type': 'block', 'children': ['145', '157', '164']}; {'id': '145', 'type': 'if_statement', 'children': ['146', '155']}; {'id': '146', 'type': 'not_operator', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '153']}; {'id': '148', 'type': 'attribute', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '153', 'type': 'argument_list', 'children': ['154']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'override_file'}; {'id': '155', 'type': 'block', 'children': ['156']}; {'id': '156', 'type': 'continue_statement', 'children': []}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'import_path'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'override_file'}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'call', 'children': ['166', '171']}; {'id': '166', 'type': 'attribute', 'children': ['167', '170']}; {'id': '167', 'type': 'call', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'globals'}; {'id': '169', 'type': 'argument_list', 'children': []}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'dictionary_comprehension', 'children': ['173', '180', '186']}; {'id': '173', 'type': 'pair', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '175', 'type': 'call', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '177', 'type': 'argument_list', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '180', 'type': 'for_in_clause', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'dir'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '186', 'type': 'if_clause', 'children': ['187']}; {'id': '187', 'type': 'not_operator', 'children': ['188']}; {'id': '188', 'type': 'call', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '192', 'type': 'argument_list', 'children': ['193']}; {'id': '193', 'type': 'string', 'children': [], 'value': '"__"'} | Scan over all the involved directories and load configs from them. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '15']}; {'id': '8', 'type': 'attribute', 'children': ['9', '14']}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'JSSObjectList'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'keyword_argument', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '18', 'type': 'lambda', 'children': ['19', '21']}; {'id': '19', 'type': 'lambda_parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'id'} | Sort list elements by ID. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_by_name'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '15']}; {'id': '8', 'type': 'attribute', 'children': ['9', '14']}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'JSSObjectList'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'keyword_argument', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '18', 'type': 'lambda', 'children': ['19', '21']}; {'id': '19', 'type': 'lambda_parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'name'} | Sort list elements by name. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_radix_sort'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '7', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '8', 'type': 'block', 'children': ['9', '19', '23', '34', '69', '83']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '16']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '15'], 'value': '<='}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '15', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'done_bucket'}; {'id': '22', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'buckets'}; {'id': '26', 'type': 'list_comprehension', 'children': ['27', '28']}; {'id': '27', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '28', 'type': 'for_in_clause', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '30', 'type': 'call', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'integer', 'children': [], 'value': '255'}; {'id': '34', 'type': 'for_statement', 'children': ['35', '36', '37']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'if_statement', 'children': ['39', '45', '53']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '41'], 'value': '>='}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '43', 'type': 'argument_list', 'children': ['44']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '45', 'type': 'block', 'children': ['46']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'done_bucket'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '53', 'type': 'else_clause', 'children': ['54']}; {'id': '54', 'type': 'block', 'children': ['55']}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '67']}; {'id': '57', 'type': 'attribute', 'children': ['58', '66']}; {'id': '58', 'type': 'subscript', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'buckets'}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'ord'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'subscript', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'buckets'}; {'id': '72', 'type': 'list_comprehension', 'children': ['73', '80']}; {'id': '73', 'type': 'call', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': '_radix_sort'}; {'id': '75', 'type': 'argument_list', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '77', 'type': 'binary_operator', 'children': ['78', '79'], 'value': '+'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '79', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '80', 'type': 'for_in_clause', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'buckets'}; {'id': '83', 'type': 'return_statement', 'children': ['84']}; {'id': '84', 'type': 'binary_operator', 'children': ['85', '86'], 'value': '+'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'done_bucket'}; {'id': '86', 'type': 'list_comprehension', 'children': ['87', '88', '91']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '88', 'type': 'for_in_clause', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'blist'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'buckets'}; {'id': '91', 'type': 'for_in_clause', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'blist'} | Most significant char radix sort |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_clusters'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'platform'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'retry_contexts'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'all_clusters'}; {'id': '8', 'type': 'block', 'children': ['9', '11', '15', '27', '120', '141', '156']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'string', 'children': [], 'value': "''' return clusters sorted by load. '''"}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'assignment', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'possible_cluster_info'}; {'id': '14', 'type': 'dictionary', 'children': []}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'all_clusters'}; {'id': '27', 'type': 'while_statement', 'children': ['28', '32']}; {'id': '28', 'type': 'boolean_operator', 'children': ['29', '30'], 'value': 'and'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '30', 'type': 'not_operator', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'possible_cluster_info'}; {'id': '32', 'type': 'block', 'children': ['33', '38', '101']}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'call', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'wait_for_any_cluster'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'retry_contexts'}; {'id': '38', 'type': 'for_statement', 'children': ['39', '40', '50']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'cluster'}; {'id': '40', 'type': 'call', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '42', 'type': 'argument_list', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '44', 'type': 'keyword_argument', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'attrgetter'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'string', 'children': [], 'value': "'priority'"}; {'id': '50', 'type': 'block', 'children': ['51', '59', '65', '71']}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '54', 'type': 'subscript', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'retry_contexts'}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'cluster'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '59', 'type': 'if_statement', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'in_retry_wait'}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'continue_statement', 'children': []}; {'id': '65', 'type': 'if_statement', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'failed'}; {'id': '69', 'type': 'block', 'children': ['70']}; {'id': '70', 'type': 'continue_statement', 'children': []}; {'id': '71', 'type': 'try_statement', 'children': ['72', '89']}; {'id': '72', 'type': 'block', 'children': ['73', '83']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'cluster_info'}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'get_cluster_info'}; {'id': '80', 'type': 'argument_list', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'cluster'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'platform'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '88']}; {'id': '85', 'type': 'subscript', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'possible_cluster_info'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'cluster'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'cluster_info'}; {'id': '89', 'type': 'except_clause', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'OsbsException'}; {'id': '91', 'type': 'block', 'children': ['92']}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'call', 'children': ['94', '97']}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'try_again_later'}; {'id': '97', 'type': 'argument_list', 'children': ['98']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'find_cluster_retry_delay'}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'augmented_assignment', 'children': ['103', '104'], 'value': '-='}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '104', 'type': 'call', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'list_comprehension', 'children': ['108', '109', '112']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '109', 'type': 'for_in_clause', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '112', 'type': 'if_clause', 'children': ['113']}; {'id': '113', 'type': 'attribute', 'children': ['114', '119']}; {'id': '114', 'type': 'subscript', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'retry_contexts'}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'failed'}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '123', 'type': 'call', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '125', 'type': 'argument_list', 'children': ['126', '131']}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'possible_cluster_info'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '130', 'type': 'argument_list', 'children': []}; {'id': '131', 'type': 'keyword_argument', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '133', 'type': 'lambda', 'children': ['134', '136']}; {'id': '134', 'type': 'lambda_parameters', 'children': ['135']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '136', 'type': 'attribute', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'cluster'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'priority'}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '144', 'type': 'call', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '146', 'type': 'argument_list', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '148', 'type': 'keyword_argument', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '150', 'type': 'lambda', 'children': ['151', '153']}; {'id': '151', 'type': 'lambda_parameters', 'children': ['152']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '156', 'type': 'return_statement', 'children': ['157']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'ret'} | return clusters sorted by load. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'insert'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '8', 'type': 'block', 'children': ['9', '42', '52']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '15']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '12'], 'value': 'in'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'keyOrder'}; {'id': '15', 'type': 'block', 'children': ['16', '27', '33']}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '19', 'type': 'call', 'children': ['20', '25']}; {'id': '20', 'type': 'attribute', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'keyOrder'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '27', 'type': 'delete_statement', 'children': ['28']}; {'id': '28', 'type': 'subscript', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'keyOrder'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '33', 'type': 'if_statement', 'children': ['34', '37']}; {'id': '34', 'type': 'comparison_operator', 'children': ['35', '36'], 'value': '<'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'augmented_assignment', 'children': ['40', '41'], 'value': '-='}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '41', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '49']}; {'id': '44', 'type': 'attribute', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'keyOrder'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'insert'}; {'id': '49', 'type': 'argument_list', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '61']}; {'id': '54', 'type': 'attribute', 'children': ['55', '60']}; {'id': '55', 'type': 'call', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '57', 'type': 'argument_list', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'SortedDict'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': '__setitem__'}; {'id': '61', 'type': 'argument_list', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'value'} | Inserts the key, value pair before the item with the given index. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8', '10']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_citation_sort_key'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'typed_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '6', 'type': 'type', 'children': ['7']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'EdgeTuple'}; {'id': '8', 'type': 'type', 'children': ['9']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'return_statement', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'string', 'children': [], 'value': '\'"{}", "{}"\''}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '24']}; {'id': '17', 'type': 'subscript', 'children': ['18', '23']}; {'id': '18', 'type': 'subscript', 'children': ['19', '22']}; {'id': '19', 'type': 'subscript', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '21', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'CITATION'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'CITATION_TYPE'}; {'id': '24', 'type': 'subscript', 'children': ['25', '30']}; {'id': '25', 'type': 'subscript', 'children': ['26', '29']}; {'id': '26', 'type': 'subscript', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '28', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'CITATION'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'CITATION_REFERENCE'} | Make a confusing 4 tuple sortable by citation. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '12', '18']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'clean_pubmed_identifiers'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'typed_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'pmids'}; {'id': '6', 'type': 'type', 'children': ['7']}; {'id': '7', 'type': 'generic_type', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'Iterable'}; {'id': '9', 'type': 'type_parameter', 'children': ['10']}; {'id': '10', 'type': 'type', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '12', 'type': 'type', 'children': ['13']}; {'id': '13', 'type': 'generic_type', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'List'}; {'id': '15', 'type': 'type_parameter', 'children': ['16']}; {'id': '16', 'type': 'type', 'children': ['17']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '18', 'type': 'block', 'children': ['19']}; {'id': '19', 'type': 'return_statement', 'children': ['20']}; {'id': '20', 'type': 'call', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'set_comprehension', 'children': ['24', '32']}; {'id': '24', 'type': 'call', 'children': ['25', '31']}; {'id': '25', 'type': 'attribute', 'children': ['26', '30']}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'pmid'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '31', 'type': 'argument_list', 'children': []}; {'id': '32', 'type': 'for_in_clause', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'pmid'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'pmids'} | Clean a list of PubMed identifiers with string strips, deduplicates, and sorting. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'find'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '6', 'type': 'block', 'children': ['7', '22', '78']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '19']}; {'id': '8', 'type': 'boolean_operator', 'children': ['9', '16'], 'value': 'and'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'expressions'}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'return_statement', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '22', 'type': 'if_statement', 'children': ['23', '38']}; {'id': '23', 'type': 'boolean_operator', 'children': ['24', '31'], 'value': 'or'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '33', 'type': 'argument_list', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '38', 'type': 'block', 'children': ['39', '56']}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '42', 'type': '()', 'children': ['43']}; {'id': '43', 'type': 'conditional_expression', 'children': ['44', '52', '55'], 'value': 'if'}; {'id': '44', 'type': 'call', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'functools'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'cmp_to_key'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': '_compare'}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'expressions'}; {'id': '55', 'type': 'None', 'children': []}; {'id': '56', 'type': 'return_statement', 'children': ['57']}; {'id': '57', 'type': 'list', 'children': ['58'], 'value': '[jsonpath_rw.DatumInContext.wrap(\n [value for value in sorted(datum.value, key=key)])]'}; {'id': '58', 'type': 'call', 'children': ['59', '64']}; {'id': '59', 'type': 'attribute', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'jsonpath_rw'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'DatumInContext'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'wrap'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'list_comprehension', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '67', 'type': 'for_in_clause', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '69', 'type': 'call', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '71', 'type': 'argument_list', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'datum'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '75', 'type': 'keyword_argument', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '78', 'type': 'return_statement', 'children': ['79']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'datum'} | Return sorted value of This if list or dict. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_child_type_choices'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '7', 'type': 'block', 'children': ['8', '23', '33', '37', '41', '118']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '11', 'type': 'call', 'children': ['12', '20']}; {'id': '12', 'type': 'attribute', 'children': ['13', '18', '19']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '15', 'type': 'argument_list', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'ChildModelPluginPolymorphicParentModelAdmin'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'get_child_type_choices'}; {'id': '20', 'type': 'argument_list', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'plugins'}; {'id': '26', 'type': 'call', 'children': ['27', '32']}; {'id': '27', 'type': 'attribute', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'child_model_plugin_class'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'get_plugins'}; {'id': '32', 'type': 'argument_list', 'children': []}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'labels'}; {'id': '36', 'type': 'dictionary', 'children': []}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'sort_priorities'}; {'id': '40', 'type': 'dictionary', 'children': []}; {'id': '41', 'type': 'if_statement', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'plugins'}; {'id': '43', 'type': 'block', 'children': ['44', '80', '94']}; {'id': '44', 'type': 'for_statement', 'children': ['45', '46', '47']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'plugin'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'plugins'}; {'id': '47', 'type': 'block', 'children': ['48', '56', '67']}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'assignment', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'pk'}; {'id': '51', 'type': 'attribute', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'plugin'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'content_type'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'pk'}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'assignment', 'children': ['58', '61']}; {'id': '58', 'type': 'subscript', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'labels'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'pk'}; {'id': '61', 'type': 'call', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'capfirst'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'plugin'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'verbose_name'}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'assignment', 'children': ['69', '72']}; {'id': '69', 'type': 'subscript', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'sort_priorities'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'pk'}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '74', 'type': 'argument_list', 'children': ['75', '76', '77']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'plugin'}; {'id': '76', 'type': 'string', 'children': [], 'value': "'sort_priority'"}; {'id': '77', 'type': 'subscript', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'labels'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'pk'}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '83', 'type': 'list_comprehension', 'children': ['84', '89']}; {'id': '84', 'type': 'tuple', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'ctype'}; {'id': '86', 'type': 'subscript', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'labels'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'ctype'}; {'id': '89', 'type': 'for_in_clause', 'children': ['90', '93']}; {'id': '90', 'type': 'pattern_list', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'ctype'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '94', 'type': 'return_statement', 'children': ['95']}; {'id': '95', 'type': 'call', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '97', 'type': 'argument_list', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '99', 'type': 'keyword_argument', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'cmp'}; {'id': '101', 'type': 'lambda', 'children': ['102', '105']}; {'id': '102', 'type': 'lambda_parameters', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'cmp'}; {'id': '107', 'type': 'argument_list', 'children': ['108', '113']}; {'id': '108', 'type': 'subscript', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'sort_priorities'}; {'id': '110', 'type': 'subscript', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '112', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '113', 'type': 'subscript', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'sort_priorities'}; {'id': '115', 'type': 'subscript', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '117', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '118', 'type': 'return_statement', 'children': ['119']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'choices'} | Override choice labels with ``verbose_name`` from plugins and sort. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sortedSemver'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '7', 'type': 'string', 'children': [], 'value': '"asc"'}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '19', '77']}; {'id': '10', 'type': 'boolean_operator', 'children': ['11', '12'], 'value': 'and'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '14', 'type': 'argument_list', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '16', 'type': 'tuple', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'if_statement', 'children': ['21', '22', '45']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'PY2'}; {'id': '22', 'type': 'block', 'children': ['23']}; {'id': '23', 'type': 'return_statement', 'children': ['24']}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28', '33']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '28', 'type': 'keyword_argument', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'cmp'}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'semver'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'compare'}; {'id': '33', 'type': 'keyword_argument', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '35', 'type': 'conditional_expression', 'children': ['36', '37', '44'], 'value': 'if'}; {'id': '36', 'type': 'True', 'children': []}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '43'], 'value': '=='}; {'id': '38', 'type': 'call', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'upper'}; {'id': '42', 'type': 'argument_list', 'children': []}; {'id': '43', 'type': 'string', 'children': [], 'value': '"DESC"'}; {'id': '44', 'type': 'False', 'children': []}; {'id': '45', 'type': 'else_clause', 'children': ['46']}; {'id': '46', 'type': 'block', 'children': ['47', '52']}; {'id': '47', 'type': 'import_from_statement', 'children': ['48', '50']}; {'id': '48', 'type': 'dotted_name', 'children': ['49']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'functools'}; {'id': '50', 'type': 'dotted_name', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'cmp_to_key'}; {'id': '52', 'type': 'return_statement', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '57', '65']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'versions'}; {'id': '57', 'type': 'keyword_argument', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '59', 'type': 'call', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'cmp_to_key'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'semver'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'compare'}; {'id': '65', 'type': 'keyword_argument', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '67', 'type': 'conditional_expression', 'children': ['68', '69', '76'], 'value': 'if'}; {'id': '68', 'type': 'True', 'children': []}; {'id': '69', 'type': 'comparison_operator', 'children': ['70', '75'], 'value': '=='}; {'id': '70', 'type': 'call', 'children': ['71', '74']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'upper'}; {'id': '74', 'type': 'argument_list', 'children': []}; {'id': '75', 'type': 'string', 'children': [], 'value': '"DESC"'}; {'id': '76', 'type': 'False', 'children': []}; {'id': '77', 'type': 'else_clause', 'children': ['78']}; {'id': '78', 'type': 'block', 'children': ['79']}; {'id': '79', 'type': 'raise_statement', 'children': ['80']}; {'id': '80', 'type': 'call', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'string', 'children': [], 'value': '"Invaild Versions, a list or tuple is right."'} | Semantically sort the list of version Numbers |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_cache_key'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '19', '25', '31', '58']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '18']}; {'id': '13', 'type': 'attribute', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '18', 'type': 'argument_list', 'children': []}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '24', 'type': 'argument_list', 'children': []}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'cache_key'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '30', 'type': 'argument_list', 'children': []}; {'id': '31', 'type': 'for_statement', 'children': ['32', '33', '34']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'if_statement', 'children': ['36', '47']}; {'id': '36', 'type': 'boolean_operator', 'children': ['37', '44'], 'value': 'and'}; {'id': '37', 'type': 'boolean_operator', 'children': ['38', '41'], 'value': 'and'}; {'id': '38', 'type': 'comparison_operator', 'children': ['39', '40'], 'value': '!='}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '40', 'type': 'string', 'children': [], 'value': '"api_sig"'}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': '!='}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '43', 'type': 'string', 'children': [], 'value': '"api_key"'}; {'id': '44', 'type': 'comparison_operator', 'children': ['45', '46'], 'value': '!='}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '46', 'type': 'string', 'children': [], 'value': '"sk"'}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'augmented_assignment', 'children': ['50', '51'], 'value': '+='}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'cache_key'}; {'id': '51', 'type': 'binary_operator', 'children': ['52', '53'], 'value': '+'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '53', 'type': 'subscript', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '58', 'type': 'return_statement', 'children': ['59']}; {'id': '59', 'type': 'call', 'children': ['60', '73']}; {'id': '60', 'type': 'attribute', 'children': ['61', '72']}; {'id': '61', 'type': 'call', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'hashlib'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'sha1'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'call', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'cache_key'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'encode'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'string', 'children': [], 'value': '"utf-8"'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'hexdigest'}; {'id': '73', 'type': 'argument_list', 'children': []} | The cache key is a string of concatenated sorted names and values. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_and_print_entries'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '6', 'type': 'block', 'children': ['7', '19', '33', '84', '98', '270']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'is_float'}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '14'], 'value': 'in'}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'number_type'}; {'id': '14', 'type': 'tuple', 'children': ['15', '16', '17', '18']}; {'id': '15', 'type': 'string', 'children': [], 'value': '"float"'}; {'id': '16', 'type': 'string', 'children': [], 'value': '"real"'}; {'id': '17', 'type': 'string', 'children': [], 'value': '"f"'}; {'id': '18', 'type': 'string', 'children': [], 'value': '"r"'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'signed'}; {'id': '22', 'type': 'boolean_operator', 'children': ['23', '26'], 'value': 'or'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'signed'}; {'id': '26', 'type': 'comparison_operator', 'children': ['27', '30'], 'value': 'in'}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'number_type'}; {'id': '30', 'type': 'tuple', 'children': ['31', '32']}; {'id': '31', 'type': 'string', 'children': [], 'value': '"real"'}; {'id': '32', 'type': 'string', 'children': [], 'value': '"r"'}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'alg'}; {'id': '36', 'type': '()', 'children': ['37']}; {'id': '37', 'type': 'binary_operator', 'children': ['38', '75'], 'value': '|'}; {'id': '38', 'type': 'binary_operator', 'children': ['39', '66'], 'value': '|'}; {'id': '39', 'type': 'binary_operator', 'children': ['40', '55'], 'value': '|'}; {'id': '40', 'type': 'binary_operator', 'children': ['41', '48'], 'value': '|'}; {'id': '41', 'type': 'binary_operator', 'children': ['42', '47'], 'value': '*'}; {'id': '42', 'type': 'attribute', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'FLOAT'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'is_float'}; {'id': '48', 'type': 'binary_operator', 'children': ['49', '54'], 'value': '*'}; {'id': '49', 'type': 'attribute', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'SIGNED'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'signed'}; {'id': '55', 'type': 'binary_operator', 'children': ['56', '61'], 'value': '*'}; {'id': '56', 'type': 'attribute', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'NOEXP'}; {'id': '61', 'type': '()', 'children': ['62']}; {'id': '62', 'type': 'not_operator', 'children': ['63']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'exp'}; {'id': '66', 'type': 'binary_operator', 'children': ['67', '72'], 'value': '*'}; {'id': '67', 'type': 'attribute', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'PATH'}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'paths'}; {'id': '75', 'type': 'binary_operator', 'children': ['76', '81'], 'value': '*'}; {'id': '76', 'type': 'attribute', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'LOCALE'}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'locale'}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'do_filter'}; {'id': '87', 'type': 'boolean_operator', 'children': ['88', '93'], 'value': 'or'}; {'id': '88', 'type': 'comparison_operator', 'children': ['89', '92'], 'value': 'is'}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '92', 'type': 'None', 'children': []}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '97'], 'value': 'is'}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'reverse_filter'}; {'id': '97', 'type': 'None', 'children': []}; {'id': '98', 'type': 'if_statement', 'children': ['99', '104']}; {'id': '99', 'type': 'boolean_operator', 'children': ['100', '101'], 'value': 'or'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'do_filter'}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'exclude'}; {'id': '104', 'type': 'block', 'children': ['105', '136', '143', '191', '240']}; {'id': '105', 'type': 'expression_statement', 'children': ['106']}; {'id': '106', 'type': 'assignment', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'inp_options'}; {'id': '108', 'type': '()', 'children': ['109']}; {'id': '109', 'type': 'binary_operator', 'children': ['110', '125'], 'value': '|'}; {'id': '110', 'type': 'binary_operator', 'children': ['111', '118'], 'value': '|'}; {'id': '111', 'type': 'binary_operator', 'children': ['112', '117'], 'value': '*'}; {'id': '112', 'type': 'attribute', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'FLOAT'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'is_float'}; {'id': '118', 'type': 'binary_operator', 'children': ['119', '124'], 'value': '*'}; {'id': '119', 'type': 'attribute', 'children': ['120', '123']}; {'id': '120', 'type': 'attribute', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'SIGNED'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'signed'}; {'id': '125', 'type': 'binary_operator', 'children': ['126', '131'], 'value': '*'}; {'id': '126', 'type': 'attribute', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'ns'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'NOEXP'}; {'id': '131', 'type': '()', 'children': ['132']}; {'id': '132', 'type': 'not_operator', 'children': ['133']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'exp'}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '139', 'type': 'call', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'regex_chooser'}; {'id': '141', 'type': 'argument_list', 'children': ['142']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'inp_options'}; {'id': '143', 'type': 'if_statement', 'children': ['144', '149']}; {'id': '144', 'type': 'comparison_operator', 'children': ['145', '148'], 'value': 'is'}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '148', 'type': 'None', 'children': []}; {'id': '149', 'type': 'block', 'children': ['150', '174']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '155']}; {'id': '152', 'type': 'pattern_list', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'lows'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'highs'}; {'id': '155', 'type': 'tuple', 'children': ['156', '165']}; {'id': '156', 'type': 'list_comprehension', 'children': ['157', '160']}; {'id': '157', 'type': 'subscript', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '159', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '160', 'type': 'for_in_clause', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '165', 'type': 'list_comprehension', 'children': ['166', '169']}; {'id': '166', 'type': 'subscript', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '168', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '169', 'type': 'for_in_clause', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'assignment', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '177', 'type': 'list_comprehension', 'children': ['178', '179', '182']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '179', 'type': 'for_in_clause', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '182', 'type': 'if_clause', 'children': ['183']}; {'id': '183', 'type': 'call', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'keep_entry_range'}; {'id': '185', 'type': 'argument_list', 'children': ['186', '187', '188', '189', '190']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'lows'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'highs'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '191', 'type': 'if_statement', 'children': ['192', '197']}; {'id': '192', 'type': 'comparison_operator', 'children': ['193', '196'], 'value': 'is'}; {'id': '193', 'type': 'attribute', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'reverse_filter'}; {'id': '196', 'type': 'None', 'children': []}; {'id': '197', 'type': 'block', 'children': ['198', '222']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '203']}; {'id': '200', 'type': 'pattern_list', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'lows'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'highs'}; {'id': '203', 'type': 'tuple', 'children': ['204', '213']}; {'id': '204', 'type': 'list_comprehension', 'children': ['205', '208']}; {'id': '205', 'type': 'subscript', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '207', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '208', 'type': 'for_in_clause', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '210', 'type': 'attribute', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'reverse_filter'}; {'id': '213', 'type': 'list_comprehension', 'children': ['214', '217']}; {'id': '214', 'type': 'subscript', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '216', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '217', 'type': 'for_in_clause', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'reverse_filter'}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'assignment', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '225', 'type': 'list_comprehension', 'children': ['226', '227', '230']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '227', 'type': 'for_in_clause', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '230', 'type': 'if_clause', 'children': ['231']}; {'id': '231', 'type': 'not_operator', 'children': ['232']}; {'id': '232', 'type': 'call', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'keep_entry_range'}; {'id': '234', 'type': 'argument_list', 'children': ['235', '236', '237', '238', '239']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'lows'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'highs'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '240', 'type': 'if_statement', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'exclude'}; {'id': '244', 'type': 'block', 'children': ['245', '254']}; {'id': '245', 'type': 'expression_statement', 'children': ['246']}; {'id': '246', 'type': 'assignment', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'exclude'}; {'id': '248', 'type': 'call', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '250', 'type': 'argument_list', 'children': ['251']}; {'id': '251', 'type': 'attribute', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'exclude'}; {'id': '254', 'type': 'expression_statement', 'children': ['255']}; {'id': '255', 'type': 'assignment', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '257', 'type': 'list_comprehension', 'children': ['258', '259', '262']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '259', 'type': 'for_in_clause', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '262', 'type': 'if_clause', 'children': ['263']}; {'id': '263', 'type': 'call', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'keep_entry_value'}; {'id': '265', 'type': 'argument_list', 'children': ['266', '267', '268', '269']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'exclude'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '270', 'type': 'for_statement', 'children': ['271', '272', '286']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '272', 'type': 'call', 'children': ['273', '276']}; {'id': '273', 'type': 'attribute', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'natsort'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'natsorted'}; {'id': '276', 'type': 'argument_list', 'children': ['277', '278', '283']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '278', 'type': 'keyword_argument', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '280', 'type': 'attribute', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '283', 'type': 'keyword_argument', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'alg'}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'alg'}; {'id': '286', 'type': 'block', 'children': ['287']}; {'id': '287', 'type': 'expression_statement', 'children': ['288']}; {'id': '288', 'type': 'call', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'entry'} | Sort the entries, applying the filters first if necessary. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_runs'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '13', '21', '29', '38', '47', '58', '69', '75', '106', '133', '141', '149']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '8', 'type': 'subscript', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'current_app'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '12', 'type': 'string', 'children': [], 'value': '"data"'}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'draw'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'parse_int_arg'}; {'id': '18', 'type': 'argument_list', 'children': ['19', '20']}; {'id': '19', 'type': 'string', 'children': [], 'value': '"draw"'}; {'id': '20', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'parse_int_arg'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28']}; {'id': '27', 'type': 'string', 'children': [], 'value': '"start"'}; {'id': '28', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'parse_int_arg'}; {'id': '34', 'type': 'argument_list', 'children': ['35', '36']}; {'id': '35', 'type': 'string', 'children': [], 'value': '"length"'}; {'id': '36', 'type': 'unary_operator', 'children': ['37'], 'value': '-'}; {'id': '37', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'assignment', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '41', 'type': 'conditional_expression', 'children': ['42', '43', '46'], 'value': 'if'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '45'], 'value': '>='}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '45', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '46', 'type': 'None', 'children': []}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '50', 'type': 'call', 'children': ['51', '56']}; {'id': '51', 'type': 'attribute', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'string', 'children': [], 'value': '"order[0][column]"'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'order_dir'}; {'id': '61', 'type': 'call', 'children': ['62', '67']}; {'id': '62', 'type': 'attribute', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'string', 'children': [], 'value': '"order[0][dir]"'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'parse_query_filter'}; {'id': '74', 'type': 'argument_list', 'children': []}; {'id': '75', 'type': 'if_statement', 'children': ['76', '79']}; {'id': '76', 'type': 'comparison_operator', 'children': ['77', '78'], 'value': 'is'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '78', 'type': 'None', 'children': []}; {'id': '79', 'type': 'block', 'children': ['80', '97']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83', '84']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '83', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '84', 'type': 'call', 'children': ['85', '90']}; {'id': '85', 'type': 'attribute', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'binary_operator', 'children': ['92', '93'], 'value': '%'}; {'id': '92', 'type': 'string', 'children': [], 'value': '"columns[%d][name]"'}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '101']}; {'id': '98', 'type': 'comparison_operator', 'children': ['99', '100'], 'value': '=='}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '100', 'type': 'string', 'children': [], 'value': '"hostname"'}; {'id': '101', 'type': 'block', 'children': ['102']}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'assignment', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '105', 'type': 'string', 'children': [], 'value': '"host.hostname"'}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'runs'}; {'id': '109', 'type': 'call', 'children': ['110', '117']}; {'id': '110', 'type': 'attribute', 'children': ['111', '116']}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'get_run_dao'}; {'id': '115', 'type': 'argument_list', 'children': []}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'get_runs'}; {'id': '117', 'type': 'argument_list', 'children': ['118', '121', '124', '127', '130']}; {'id': '118', 'type': 'keyword_argument', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '121', 'type': 'keyword_argument', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '124', 'type': 'keyword_argument', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'sort_by'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'order_column'}; {'id': '127', 'type': 'keyword_argument', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'sort_direction'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'order_dir'}; {'id': '130', 'type': 'keyword_argument', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'records_total'}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'runs'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '140', 'type': 'argument_list', 'children': []}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'records_filtered'}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'runs'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '148', 'type': 'argument_list', 'children': []}; {'id': '149', 'type': 'return_statement', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'Response'}; {'id': '152', 'type': 'argument_list', 'children': ['153', '169']}; {'id': '153', 'type': 'call', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'render_template'}; {'id': '155', 'type': 'argument_list', 'children': ['156', '157', '160', '163', '166']}; {'id': '156', 'type': 'string', 'children': [], 'value': '"api/runs.js"'}; {'id': '157', 'type': 'keyword_argument', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'runs'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'runs'}; {'id': '160', 'type': 'keyword_argument', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'draw'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'draw'}; {'id': '163', 'type': 'keyword_argument', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'recordsTotal'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'records_total'}; {'id': '166', 'type': 'keyword_argument', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'recordsFiltered'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'records_filtered'}; {'id': '169', 'type': 'keyword_argument', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'mimetype'}; {'id': '171', 'type': 'string', 'children': [], 'value': '"application/json"'} | Get all runs, sort it and return a response. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'tcsort'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'binary_operator', 'children': ['8', '14'], 'value': '+'}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '10', 'type': 'argument_list', 'children': ['11']}; {'id': '11', 'type': 'subscript', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '13', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'sum'}; {'id': '16', 'type': 'generator_expression', 'children': ['17', '21']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'tcsort'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'kv'}; {'id': '21', 'type': 'for_in_clause', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'kv'}; {'id': '23', 'type': 'call', 'children': ['24', '29']}; {'id': '24', 'type': 'attribute', 'children': ['25', '28']}; {'id': '25', 'type': 'subscript', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '27', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '29', 'type': 'argument_list', 'children': []} | get len of transitive closure assume type items is tree... |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'getSubOrder'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '5', 'type': 'block', 'children': ['6', '46', '50', '106', '115', '127', '136']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'alpha'}; {'id': '9', 'type': 'subscript', 'children': ['10', '45']}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'list_splat', 'children': ['17']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '37']}; {'id': '20', 'type': 'generator_expression', 'children': ['21', '28']}; {'id': '21', 'type': 'tuple', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '23', 'type': 'subscript', 'children': ['24', '27']}; {'id': '24', 'type': 'subscript', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '26', 'type': 'string', 'children': [], 'value': "'rec'"}; {'id': '27', 'type': 'string', 'children': [], 'value': "'label'"}; {'id': '28', 'type': 'for_in_clause', 'children': ['29', '32']}; {'id': '29', 'type': 'pattern_list', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '36', 'type': 'argument_list', 'children': []}; {'id': '37', 'type': 'keyword_argument', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '39', 'type': 'lambda', 'children': ['40', '42']}; {'id': '40', 'type': 'lambda_parameters', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '44', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '45', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '49', 'type': 'dictionary', 'children': []}; {'id': '50', 'type': 'function_definition', 'children': ['51', '52', '54']}; {'id': '51', 'type': 'function_name', 'children': [], 'value': 'getDepth'}; {'id': '52', 'type': 'parameters', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '54', 'type': 'block', 'children': ['55']}; {'id': '55', 'type': 'if_statement', 'children': ['56', '59', '64']}; {'id': '56', 'type': 'comparison_operator', 'children': ['57', '58'], 'value': 'in'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'return_statement', 'children': ['61']}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '64', 'type': 'else_clause', 'children': ['65']}; {'id': '65', 'type': 'block', 'children': ['66']}; {'id': '66', 'type': 'if_statement', 'children': ['67', '70', '101']}; {'id': '67', 'type': 'comparison_operator', 'children': ['68', '69'], 'value': 'in'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '70', 'type': 'block', 'children': ['71', '82', '97']}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'assignment', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'names_above'}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'getDepth'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'subscript', 'children': ['78', '81']}; {'id': '78', 'type': 'subscript', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '81', 'type': 'string', 'children': [], 'value': "'sc'"}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'assignment', 'children': ['84', '87']}; {'id': '84', 'type': 'subscript', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '87', 'type': 'binary_operator', 'children': ['88', '89'], 'value': '+'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'names_above'}; {'id': '89', 'type': 'list', 'children': ['90'], 'value': "[existing[id_]['rec']['label']]"}; {'id': '90', 'type': 'subscript', 'children': ['91', '96']}; {'id': '91', 'type': 'subscript', 'children': ['92', '95']}; {'id': '92', 'type': 'subscript', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '95', 'type': 'string', 'children': [], 'value': "'rec'"}; {'id': '96', 'type': 'string', 'children': [], 'value': "'label'"}; {'id': '97', 'type': 'return_statement', 'children': ['98']}; {'id': '98', 'type': 'subscript', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '101', 'type': 'else_clause', 'children': ['102']}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'return_statement', 'children': ['104']}; {'id': '104', 'type': 'list', 'children': ['105'], 'value': "['']"}; {'id': '105', 'type': 'string', 'children': [], 'value': "''"}; {'id': '106', 'type': 'for_statement', 'children': ['107', '108', '109']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'existing'}; {'id': '109', 'type': 'block', 'children': ['110']}; {'id': '110', 'type': 'expression_statement', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'getDepth'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'call', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '118', 'type': 'argument_list', 'children': ['119']}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'call', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '126', 'type': 'argument_list', 'children': []}; {'id': '127', 'type': 'function_definition', 'children': ['128', '129', '131']}; {'id': '128', 'type': 'function_name', 'children': [], 'value': 'key_'}; {'id': '129', 'type': 'parameters', 'children': ['130']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'return_statement', 'children': ['133']}; {'id': '133', 'type': 'subscript', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'id_'}; {'id': '136', 'type': 'return_statement', 'children': ['137']}; {'id': '137', 'type': 'call', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '139', 'type': 'argument_list', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'depths'}; {'id': '141', 'type': 'keyword_argument', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'key_'} | Alpha sort by the full chain of parents. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'do_sort_by'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'decl'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'pseudo'}; {'id': '8', 'type': 'block', 'children': ['9', '40', '64', '76', '84', '90', '100', '106', '112']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '15', '28']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '12'], 'value': 'in'}; {'id': '11', 'type': 'string', 'children': [], 'value': "','"}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'decl'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '21']}; {'id': '18', 'type': 'pattern_list', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'css'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '23', 'type': 'argument_list', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'decl'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '27', 'type': 'string', 'children': [], 'value': "','"}; {'id': '28', 'type': 'else_clause', 'children': ['29']}; {'id': '29', 'type': 'block', 'children': ['30', '36']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'css'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'decl'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '39', 'type': 'None', 'children': []}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'css_to_func'}; {'id': '45', 'type': 'argument_list', 'children': ['46', '50', '56', '59']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'serialize'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'css'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'serialize'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'boolean_operator', 'children': ['54', '55'], 'value': 'or'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '55', 'type': 'string', 'children': [], 'value': "''"}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'css_namespaces'}; {'id': '59', 'type': 'subscript', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'lang'"}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'step'}; {'id': '67', 'type': 'subscript', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '71', 'type': 'subscript', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '75', 'type': 'string', 'children': [], 'value': "'current_step'"}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '79', 'type': 'call', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'current_target'}; {'id': '83', 'type': 'argument_list', 'children': []}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'assignment', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'lang'}; {'id': '95', 'type': 'subscript', 'children': ['96', '99']}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '99', 'type': 'string', 'children': [], 'value': "'lang'"}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'isgroup'}; {'id': '105', 'type': 'False', 'children': []}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'groupby'}; {'id': '111', 'type': 'None', 'children': []}; {'id': '112', 'type': 'for_statement', 'children': ['113', '116', '117', '126']}; {'id': '113', 'type': 'pattern_list', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'pos'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '116', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '117', 'type': 'call', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'call', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'reversed'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'subscript', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'step'}; {'id': '125', 'type': 'string', 'children': [], 'value': "'actions'"}; {'id': '126', 'type': 'block', 'children': ['127']}; {'id': '127', 'type': 'if_statement', 'children': ['128', '144']}; {'id': '128', 'type': 'boolean_operator', 'children': ['129', '134', '135'], 'value': 'and'}; {'id': '129', 'type': 'comparison_operator', 'children': ['130', '133'], 'value': '=='}; {'id': '130', 'type': 'subscript', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '132', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '133', 'type': 'string', 'children': [], 'value': "'target'"}; {'id': '134', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '135', 'type': 'comparison_operator', 'children': ['136', '141'], 'value': '=='}; {'id': '136', 'type': 'attribute', 'children': ['137', '140']}; {'id': '137', 'type': 'subscript', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '139', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'etree_element'}; {'id': '144', 'type': 'block', 'children': ['145', '153', '161', '169']}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'assignment', 'children': ['147', '152']}; {'id': '147', 'type': 'attribute', 'children': ['148', '151']}; {'id': '148', 'type': 'subscript', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '150', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '160']}; {'id': '155', 'type': 'attribute', 'children': ['156', '159']}; {'id': '156', 'type': 'subscript', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '158', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'isgroup'}; {'id': '160', 'type': 'False', 'children': []}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'assignment', 'children': ['163', '168']}; {'id': '163', 'type': 'attribute', 'children': ['164', '167']}; {'id': '164', 'type': 'subscript', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '166', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'groupby'}; {'id': '168', 'type': 'None', 'children': []}; {'id': '169', 'type': 'break_statement', 'children': []} | Implement sort-by declaration - pre-match. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'keys'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '45']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '11', 'type': 'argument_list', 'children': []}; {'id': '12', 'type': 'for_statement', 'children': ['13', '14', '21']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'block', 'children': ['22', '30']}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'get_value'}; {'id': '29', 'type': 'argument_list', 'children': []}; {'id': '30', 'type': 'if_statement', 'children': ['31', '37']}; {'id': '31', 'type': 'not_operator', 'children': ['32']}; {'id': '32', 'type': 'comparison_operator', 'children': ['33', '34'], 'value': 'in'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '34', 'type': 'list', 'children': ['35', '36'], 'value': "['', None]"}; {'id': '35', 'type': 'string', 'children': [], 'value': "''"}; {'id': '36', 'type': 'None', 'children': []}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'call', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '43', 'type': 'argument_list', 'children': ['44']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '45', 'type': 'return_statement', 'children': ['46']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'keys'} | Returns a sorted list of keys |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'set_item'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '7', 'type': 'block', 'children': ['8', '19']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '18', 'type': 'argument_list', 'children': []}; {'id': '19', 'type': 'if_statement', 'children': ['20', '23', '41']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '22'], 'value': 'in'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'set_value'}; {'id': '29', 'type': 'argument_list', 'children': ['30', '31', '37']}; {'id': '30', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '31', 'type': 'call', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '37', 'type': 'call', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '41', 'type': 'else_clause', 'children': ['42']}; {'id': '42', 'type': 'block', 'children': ['43', '58']}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'call', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'set_value'}; {'id': '48', 'type': 'argument_list', 'children': ['49', '50', '54']}; {'id': '49', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '54', 'type': 'call', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'call', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'set_value'}; {'id': '63', 'type': 'argument_list', 'children': ['64', '65', '71']}; {'id': '64', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '65', 'type': 'binary_operator', 'children': ['66', '70'], 'value': '-'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '71', 'type': 'call', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'value'} | Sets the item by key, and refills the table sorted. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'calls_sorted'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '73', '79', '95', '103']}; {'id': '6', 'type': 'function_definition', 'children': ['7', '8', '10']}; {'id': '7', 'type': 'function_name', 'children': [], 'value': '_z'}; {'id': '8', 'type': 'parameters', 'children': ['9']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'if_statement', 'children': ['12', '23', '39', '66']}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '14', 'type': 'argument_list', 'children': ['15', '20']}; {'id': '15', 'type': 'attribute', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'ndarray'}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'mean'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '38']}; {'id': '31', 'type': 'attribute', 'children': ['32', '37']}; {'id': '32', 'type': 'attribute', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'flatten'}; {'id': '38', 'type': 'argument_list', 'children': []}; {'id': '39', 'type': 'elif_clause', 'children': ['40', '59']}; {'id': '40', 'type': 'boolean_operator', 'children': ['41', '50'], 'value': 'or'}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '49']}; {'id': '44', 'type': 'attribute', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '52', 'type': 'argument_list', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'return_statement', 'children': ['61']}; {'id': '61', 'type': 'attribute', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'call'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '66', 'type': 'else_clause', 'children': ['67']}; {'id': '67', 'type': 'block', 'children': ['68']}; {'id': '68', 'type': 'return_statement', 'children': ['69']}; {'id': '69', 'type': 'unary_operator', 'children': ['70'], 'value': '-'}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'inf'}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'calls'}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': '_calls'}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'zs'}; {'id': '82', 'type': 'call', 'children': ['83', '86']}; {'id': '83', 'type': 'attribute', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '86', 'type': 'argument_list', 'children': ['87']}; {'id': '87', 'type': 'list_comprehension', 'children': ['88', '92']}; {'id': '88', 'type': 'call', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': '_z'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '92', 'type': 'for_in_clause', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'calls'}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'assignment', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'sorted_inds'}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'zs'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'argsort'}; {'id': '102', 'type': 'argument_list', 'children': []}; {'id': '103', 'type': 'return_statement', 'children': ['104']}; {'id': '104', 'type': 'call', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': '_call'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'make_callgroup'}; {'id': '108', 'type': 'argument_list', 'children': ['109']}; {'id': '109', 'type': 'call', 'children': ['110', '120']}; {'id': '110', 'type': 'attribute', 'children': ['111', '119']}; {'id': '111', 'type': 'subscript', 'children': ['112', '118']}; {'id': '112', 'type': 'call', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '116', 'type': 'argument_list', 'children': ['117']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'calls'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'sorted_inds'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'tolist'}; {'id': '120', 'type': 'argument_list', 'children': []} | calls sorted in z |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'unsort_vector'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'indices_of_increasing'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'return_statement', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'list_comprehension', 'children': ['14', '22']}; {'id': '14', 'type': 'subscript', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'indices_of_increasing'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '22', 'type': 'for_in_clause', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'data'} | Upermutate 1-D data that is sorted by indices_of_increasing. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_prepare_imports'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'dicts'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '17', '33', '70', '83', '146', '152', '158', '162', '211', '237', '254']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'pseudo_ids'}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '12', 'type': 'argument_list', 'children': []}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'pseudo_matches'}; {'id': '16', 'type': 'dictionary', 'children': []}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '20', 'type': 'call', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'call', 'children': ['24', '31']}; {'id': '24', 'type': 'attribute', 'children': ['25', '30']}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '27', 'type': 'argument_list', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'OrganizationImporter'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': '_prepare_imports'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'dicts'}; {'id': '33', 'type': 'for_statement', 'children': ['34', '37', '42']}; {'id': '34', 'type': 'pattern_list', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '41', 'type': 'argument_list', 'children': []}; {'id': '42', 'type': 'block', 'children': ['43', '55']}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '46', 'type': 'boolean_operator', 'children': ['47', '54'], 'value': 'or'}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '51', 'type': 'argument_list', 'children': ['52', '53']}; {'id': '52', 'type': 'string', 'children': [], 'value': "'parent_id'"}; {'id': '53', 'type': 'None', 'children': []}; {'id': '54', 'type': 'string', 'children': [], 'value': "''"}; {'id': '55', 'type': 'if_statement', 'children': ['56', '62']}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '60', 'type': 'argument_list', 'children': ['61']}; {'id': '61', 'type': 'string', 'children': [], 'value': "'~'"}; {'id': '62', 'type': 'block', 'children': ['63']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'pseudo_ids'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'assignment', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'pseudo_ids'}; {'id': '73', 'type': 'list_comprehension', 'children': ['74', '80']}; {'id': '74', 'type': 'tuple', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '76', 'type': 'call', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'get_pseudo_id'}; {'id': '78', 'type': 'argument_list', 'children': ['79']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '80', 'type': 'for_in_clause', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'pseudo_ids'}; {'id': '83', 'type': 'for_statement', 'children': ['84', '87', '92']}; {'id': '84', 'type': 'pattern_list', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'json_id'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '91', 'type': 'argument_list', 'children': []}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'for_statement', 'children': ['94', '97', '98']}; {'id': '94', 'type': 'pattern_list', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'spec'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'pseudo_ids'}; {'id': '98', 'type': 'block', 'children': ['99', '103', '125']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '102', 'type': 'True', 'children': []}; {'id': '103', 'type': 'for_statement', 'children': ['104', '107', '112']}; {'id': '104', 'type': 'pattern_list', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'spec'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '111', 'type': 'argument_list', 'children': []}; {'id': '112', 'type': 'block', 'children': ['113']}; {'id': '113', 'type': 'if_statement', 'children': ['114', '119']}; {'id': '114', 'type': 'comparison_operator', 'children': ['115', '118'], 'value': '!='}; {'id': '115', 'type': 'subscript', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '119', 'type': 'block', 'children': ['120', '124']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '123', 'type': 'False', 'children': []}; {'id': '124', 'type': 'break_statement', 'children': []}; {'id': '125', 'type': 'if_statement', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '127', 'type': 'block', 'children': ['128', '140']}; {'id': '128', 'type': 'if_statement', 'children': ['129', '132']}; {'id': '129', 'type': 'comparison_operator', 'children': ['130', '131'], 'value': 'in'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'pseudo_matches'}; {'id': '132', 'type': 'block', 'children': ['133']}; {'id': '133', 'type': 'raise_statement', 'children': ['134']}; {'id': '134', 'type': 'call', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'UnresolvedIdError'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'binary_operator', 'children': ['138', '139'], 'value': '+'}; {'id': '138', 'type': 'string', 'children': [], 'value': "'multiple matches for pseudo id: '"}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '140', 'type': 'expression_statement', 'children': ['141']}; {'id': '141', 'type': 'assignment', 'children': ['142', '145']}; {'id': '142', 'type': 'subscript', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'pseudo_matches'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'ppid'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'json_id'}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'network'}; {'id': '149', 'type': 'call', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'Network'}; {'id': '151', 'type': 'argument_list', 'children': []}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'in_network'}; {'id': '155', 'type': 'call', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '157', 'type': 'argument_list', 'children': []}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'assignment', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'import_order'}; {'id': '161', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '162', 'type': 'for_statement', 'children': ['163', '166', '171']}; {'id': '163', 'type': 'pattern_list', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'json_id'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '170', 'type': 'argument_list', 'children': []}; {'id': '171', 'type': 'block', 'children': ['172', '182', '193', '200']}; {'id': '172', 'type': 'expression_statement', 'children': ['173']}; {'id': '173', 'type': 'assignment', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '175', 'type': 'call', 'children': ['176', '179']}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '179', 'type': 'argument_list', 'children': ['180', '181']}; {'id': '180', 'type': 'string', 'children': [], 'value': "'parent_id'"}; {'id': '181', 'type': 'None', 'children': []}; {'id': '182', 'type': 'if_statement', 'children': ['183', '186']}; {'id': '183', 'type': 'comparison_operator', 'children': ['184', '185'], 'value': 'in'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'pseudo_matches'}; {'id': '186', 'type': 'block', 'children': ['187']}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '190', 'type': 'subscript', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'pseudo_matches'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'call', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'network'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'add_node'}; {'id': '198', 'type': 'argument_list', 'children': ['199']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'json_id'}; {'id': '200', 'type': 'if_statement', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '202', 'type': 'block', 'children': ['203']}; {'id': '203', 'type': 'expression_statement', 'children': ['204']}; {'id': '204', 'type': 'call', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'network'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'add_edge'}; {'id': '208', 'type': 'argument_list', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'parent_id'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'json_id'}; {'id': '211', 'type': 'for_statement', 'children': ['212', '213', '218']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'jid'}; {'id': '213', 'type': 'call', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'network'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '217', 'type': 'argument_list', 'children': []}; {'id': '218', 'type': 'block', 'children': ['219', '230']}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'call', 'children': ['221', '224']}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'import_order'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '224', 'type': 'argument_list', 'children': ['225']}; {'id': '225', 'type': 'tuple', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'jid'}; {'id': '227', 'type': 'subscript', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'jid'}; {'id': '230', 'type': 'expression_statement', 'children': ['231']}; {'id': '231', 'type': 'call', 'children': ['232', '235']}; {'id': '232', 'type': 'attribute', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'in_network'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '235', 'type': 'argument_list', 'children': ['236']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'jid'}; {'id': '237', 'type': 'if_statement', 'children': ['238', '248']}; {'id': '238', 'type': 'comparison_operator', 'children': ['239', '240'], 'value': '!='}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'in_network'}; {'id': '240', 'type': 'call', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '242', 'type': 'argument_list', 'children': ['243']}; {'id': '243', 'type': 'call', 'children': ['244', '247']}; {'id': '244', 'type': 'attribute', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'prepared'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '247', 'type': 'argument_list', 'children': []}; {'id': '248', 'type': 'block', 'children': ['249']}; {'id': '249', 'type': 'raise_statement', 'children': ['250']}; {'id': '250', 'type': 'call', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'PupaInternalError'}; {'id': '252', 'type': 'argument_list', 'children': ['253']}; {'id': '253', 'type': 'string', 'children': [], 'value': '"import is missing nodes in network set"'}; {'id': '254', 'type': 'return_statement', 'children': ['255']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'import_order'} | an override for prepare imports that sorts the imports by parent_id dependencies |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'iterkeys'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '18', '24', '83']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'seen'}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '23', 'type': 'argument_list', 'children': []}; {'id': '24', 'type': 'for_statement', 'children': ['25', '26', '34']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '26', 'type': 'call', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'iterkeys'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'base'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'for_statement', 'children': ['36', '37', '38']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '38', 'type': 'block', 'children': ['39', '48']}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '42', 'type': 'call', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '48', 'type': 'if_statement', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '50', 'type': 'block', 'children': ['51', '67', '82']}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '54', 'type': 'conditional_expression', 'children': ['55', '61', '62'], 'value': 'if'}; {'id': '55', 'type': 'call', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'string', 'children': [], 'value': "'key'"}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '62', 'type': 'call', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '66', 'type': 'argument_list', 'children': []}; {'id': '67', 'type': 'if_statement', 'children': ['68', '71']}; {'id': '68', 'type': 'comparison_operator', 'children': ['69', '70'], 'value': 'not'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'seen'}; {'id': '71', 'type': 'block', 'children': ['72', '79']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'call', 'children': ['74', '77']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'seen'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'yield', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '82', 'type': 'break_statement', 'children': []}; {'id': '83', 'type': 'for_statement', 'children': ['84', '85', '91']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'DictMethods'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'iterkeys'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '91', 'type': 'block', 'children': ['92']}; {'id': '92', 'type': 'if_statement', 'children': ['93', '96']}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '95'], 'value': 'not'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'seen'}; {'id': '96', 'type': 'block', 'children': ['97']}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'yield', 'children': ['99']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'key'} | Unsorted iterator over keys |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'keys'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '18', '24']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'call', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '23', 'type': 'argument_list', 'children': []}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'k'} | Return sorted list of keys. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'hashify_targets'}; {'id': '3', 'type': 'parameters', 'children': ['4', '8']}; {'id': '4', 'type': 'typed_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'targets'}; {'id': '6', 'type': 'type', 'children': ['7']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'build_context'}; {'id': '9', 'type': 'type', 'children': ['10']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '15', 'type': 'generator_expression', 'children': ['16', '26']}; {'id': '16', 'type': 'call', 'children': ['17', '24']}; {'id': '17', 'type': 'attribute', 'children': ['18', '23']}; {'id': '18', 'type': 'subscript', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'build_context'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'targets'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'target_name'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'hash'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'build_context'}; {'id': '26', 'type': 'for_in_clause', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'target_name'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'listify'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'targets'} | Return sorted hashes of `targets`. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'walk_target_deps_topological_order'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'typed_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '7', 'type': 'type', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'Target'}; {'id': '9', 'type': 'block', 'children': ['10', '22']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'all_deps'}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'get_descendants'}; {'id': '15', 'type': 'argument_list', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'target_graph'}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '22', 'type': 'for_statement', 'children': ['23', '24', '30']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'dep_name'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'topological_sort'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'target_graph'}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'if_statement', 'children': ['32', '35']}; {'id': '32', 'type': 'comparison_operator', 'children': ['33', '34'], 'value': 'in'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'dep_name'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'all_deps'}; {'id': '35', 'type': 'block', 'children': ['36']}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'yield', 'children': ['38']}; {'id': '38', 'type': 'subscript', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'targets'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'dep_name'} | Generate all dependencies of `target` by topological sort order. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '10']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_print_message'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '7', 'type': 'default_parameter', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '9', 'type': 'True', 'children': []}; {'id': '10', 'type': 'block', 'children': ['11', '13', '22', '273']}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Prints a message and takes care of all sorts of nasty code'"}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'output'}; {'id': '16', 'type': 'list', 'children': ['17', '18', '19'], 'value': "['\\n', prefix, message['message']]"}; {'id': '17', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '19', 'type': 'subscript', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '21', 'type': 'string', 'children': [], 'value': "'message'"}; {'id': '22', 'type': 'if_statement', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '24', 'type': 'block', 'children': ['25', '29', '48', '68', '97', '108', '114', '175', '191', '213', '254', '261']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '28', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '29', 'type': 'if_statement', 'children': ['30', '33']}; {'id': '30', 'type': 'subscript', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '32', 'type': 'string', 'children': [], 'value': "'description'"}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'call', 'children': ['41', '44']}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': '_flatten_list'}; {'id': '44', 'type': 'argument_list', 'children': ['45']}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '47', 'type': 'string', 'children': [], 'value': "'description'"}; {'id': '48', 'type': 'if_statement', 'children': ['49', '55']}; {'id': '49', 'type': 'call', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'string', 'children': [], 'value': "'signing_severity'"}; {'id': '55', 'type': 'block', 'children': ['56']}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '61']}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': '()', 'children': ['63']}; {'id': '63', 'type': 'binary_operator', 'children': ['64', '65'], 'value': '%'}; {'id': '64', 'type': 'string', 'children': [], 'value': "'\\tAutomated signing severity: %s'"}; {'id': '65', 'type': 'subscript', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '67', 'type': 'string', 'children': [], 'value': "'signing_severity'"}; {'id': '68', 'type': 'if_statement', 'children': ['69', '75']}; {'id': '69', 'type': 'call', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'string', 'children': [], 'value': "'signing_help'"}; {'id': '75', 'type': 'block', 'children': ['76', '83']}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'string', 'children': [], 'value': "'\\tSuggestions for passing automated signing:'"}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'call', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '88', 'type': 'argument_list', 'children': ['89']}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': '_flatten_list'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'subscript', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '96', 'type': 'string', 'children': [], 'value': "'signing_help'"}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'binary_operator', 'children': ['104', '105'], 'value': '%'}; {'id': '104', 'type': 'string', 'children': [], 'value': "'\\tTier:\\t%d'"}; {'id': '105', 'type': 'subscript', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '107', 'type': 'string', 'children': [], 'value': "'tier'"}; {'id': '108', 'type': 'expression_statement', 'children': ['109']}; {'id': '109', 'type': 'assignment', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '111', 'type': 'subscript', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '113', 'type': 'string', 'children': [], 'value': "'file'"}; {'id': '114', 'type': 'if_statement', 'children': ['115', '122']}; {'id': '115', 'type': 'boolean_operator', 'children': ['116', '119'], 'value': 'and'}; {'id': '116', 'type': 'comparison_operator', 'children': ['117', '118'], 'value': 'is'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '118', 'type': 'None', 'children': []}; {'id': '119', 'type': 'comparison_operator', 'children': ['120', '121'], 'value': '!='}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '121', 'type': 'string', 'children': [], 'value': "''"}; {'id': '122', 'type': 'block', 'children': ['123', '127']}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'fmsg'}; {'id': '126', 'type': 'string', 'children': [], 'value': "'\\tFile:\\t%s'"}; {'id': '127', 'type': 'if_statement', 'children': ['128', '134', '164']}; {'id': '128', 'type': 'comparison_operator', 'children': ['129', '133'], 'value': 'is'}; {'id': '129', 'type': 'call', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '134', 'type': 'block', 'children': ['135', '150']}; {'id': '135', 'type': 'if_statement', 'children': ['136', '142']}; {'id': '136', 'type': 'comparison_operator', 'children': ['137', '141'], 'value': '=='}; {'id': '137', 'type': 'subscript', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '139', 'type': 'unary_operator', 'children': ['140'], 'value': '-'}; {'id': '140', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '141', 'type': 'string', 'children': [], 'value': "''"}; {'id': '142', 'type': 'block', 'children': ['143']}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'assignment', 'children': ['145', '149']}; {'id': '145', 'type': 'subscript', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '147', 'type': 'unary_operator', 'children': ['148'], 'value': '-'}; {'id': '148', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '149', 'type': 'string', 'children': [], 'value': "'(none)'"}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'call', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'binary_operator', 'children': ['157', '158'], 'value': '%'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'fmsg'}; {'id': '158', 'type': 'call', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'string', 'children': [], 'value': "' > '"}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '164', 'type': 'else_clause', 'children': ['165']}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'binary_operator', 'children': ['173', '174'], 'value': '%'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'fmsg'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '175', 'type': 'if_statement', 'children': ['176', '179']}; {'id': '176', 'type': 'subscript', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '178', 'type': 'string', 'children': [], 'value': "'line'"}; {'id': '179', 'type': 'block', 'children': ['180']}; {'id': '180', 'type': 'expression_statement', 'children': ['181']}; {'id': '181', 'type': 'call', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'binary_operator', 'children': ['187', '188'], 'value': '%'}; {'id': '187', 'type': 'string', 'children': [], 'value': "'\\tLine:\\t%s'"}; {'id': '188', 'type': 'subscript', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '190', 'type': 'string', 'children': [], 'value': "'line'"}; {'id': '191', 'type': 'if_statement', 'children': ['192', '201']}; {'id': '192', 'type': 'boolean_operator', 'children': ['193', '196'], 'value': 'and'}; {'id': '193', 'type': 'subscript', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '195', 'type': 'string', 'children': [], 'value': "'column'"}; {'id': '196', 'type': 'comparison_operator', 'children': ['197', '200'], 'value': '!='}; {'id': '197', 'type': 'subscript', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '199', 'type': 'string', 'children': [], 'value': "'column'"}; {'id': '200', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '201', 'type': 'block', 'children': ['202']}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'call', 'children': ['204', '207']}; {'id': '204', 'type': 'attribute', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'binary_operator', 'children': ['209', '210'], 'value': '%'}; {'id': '209', 'type': 'string', 'children': [], 'value': "'\\tColumn:\\t%d'"}; {'id': '210', 'type': 'subscript', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '212', 'type': 'string', 'children': [], 'value': "'column'"}; {'id': '213', 'type': 'if_statement', 'children': ['214', '220']}; {'id': '214', 'type': 'call', 'children': ['215', '218']}; {'id': '215', 'type': 'attribute', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '218', 'type': 'argument_list', 'children': ['219']}; {'id': '219', 'type': 'string', 'children': [], 'value': "'context'"}; {'id': '220', 'type': 'block', 'children': ['221', '228']}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'call', 'children': ['223', '226']}; {'id': '223', 'type': 'attribute', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '226', 'type': 'argument_list', 'children': ['227']}; {'id': '227', 'type': 'string', 'children': [], 'value': "'\\tContext:'"}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'call', 'children': ['230', '233']}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '233', 'type': 'argument_list', 'children': ['234']}; {'id': '234', 'type': 'list_comprehension', 'children': ['235', '249']}; {'id': '235', 'type': '()', 'children': ['236']}; {'id': '236', 'type': 'conditional_expression', 'children': ['237', '240', '243'], 'value': 'if'}; {'id': '237', 'type': 'binary_operator', 'children': ['238', '239'], 'value': '%'}; {'id': '238', 'type': 'string', 'children': [], 'value': "'\\t> %s'"}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '240', 'type': 'comparison_operator', 'children': ['241', '242'], 'value': 'is'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '242', 'type': 'None', 'children': []}; {'id': '243', 'type': 'binary_operator', 'children': ['244', '245'], 'value': '+'}; {'id': '244', 'type': 'string', 'children': [], 'value': "'\\t>'"}; {'id': '245', 'type': '()', 'children': ['246']}; {'id': '246', 'type': 'binary_operator', 'children': ['247', '248'], 'value': '*'}; {'id': '247', 'type': 'string', 'children': [], 'value': "'-'"}; {'id': '248', 'type': 'integer', 'children': [], 'value': '20'}; {'id': '249', 'type': 'for_in_clause', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '251', 'type': 'subscript', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '253', 'type': 'string', 'children': [], 'value': "'context'"}; {'id': '254', 'type': 'expression_statement', 'children': ['255']}; {'id': '255', 'type': 'call', 'children': ['256', '259']}; {'id': '256', 'type': 'attribute', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'output'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '259', 'type': 'argument_list', 'children': ['260']}; {'id': '260', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '261', 'type': 'expression_statement', 'children': ['262']}; {'id': '262', 'type': 'call', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'output'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '266', 'type': 'argument_list', 'children': ['267']}; {'id': '267', 'type': 'call', 'children': ['268', '271']}; {'id': '268', 'type': 'attribute', 'children': ['269', '270']}; {'id': '269', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '271', 'type': 'argument_list', 'children': ['272']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'verbose_output'}; {'id': '273', 'type': 'expression_statement', 'children': ['274']}; {'id': '274', 'type': 'call', 'children': ['275', '280']}; {'id': '275', 'type': 'attribute', 'children': ['276', '279']}; {'id': '276', 'type': 'attribute', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'handler'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '280', 'type': 'argument_list', 'children': ['281']}; {'id': '281', 'type': 'call', 'children': ['282', '285']}; {'id': '282', 'type': 'attribute', 'children': ['283', '284']}; {'id': '283', 'type': 'string', 'children': [], 'value': "u''"}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '285', 'type': 'argument_list', 'children': ['286']}; {'id': '286', 'type': 'call', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'map'}; {'id': '288', 'type': 'argument_list', 'children': ['289', '292']}; {'id': '289', 'type': 'attribute', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'unicodehelper'}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'decode'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'output'} | Prints a message and takes care of all sorts of nasty code |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'followingPrefix'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '23', '41', '49', '64', '74']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'prefixBytes'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '13']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'B'"}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '17', 'type': 'binary_operator', 'children': ['18', '22'], 'value': '-'}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'prefixBytes'}; {'id': '22', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '23', 'type': 'while_statement', 'children': ['24', '34']}; {'id': '24', 'type': '()', 'children': ['25']}; {'id': '25', 'type': 'boolean_operator', 'children': ['26', '29'], 'value': 'and'}; {'id': '26', 'type': 'comparison_operator', 'children': ['27', '28'], 'value': '>='}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '28', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '29', 'type': 'comparison_operator', 'children': ['30', '33'], 'value': '=='}; {'id': '30', 'type': 'subscript', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'prefixBytes'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '33', 'type': 'integer', 'children': [], 'value': '0xff'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '38', 'type': 'binary_operator', 'children': ['39', '40'], 'value': '-'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '40', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '41', 'type': 'if_statement', 'children': ['42', '46']}; {'id': '42', 'type': '()', 'children': ['43']}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '45'], 'value': '<'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '45', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '46', 'type': 'block', 'children': ['47']}; {'id': '47', 'type': 'return_statement', 'children': ['48']}; {'id': '48', 'type': 'None', 'children': []}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'newBytes'}; {'id': '52', 'type': 'call', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '54', 'type': 'argument_list', 'children': ['55', '56']}; {'id': '55', 'type': 'string', 'children': [], 'value': "'B'"}; {'id': '56', 'type': 'subscript', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '58', 'type': 'slice', 'children': ['59', '60', '61']}; {'id': '59', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '60', 'type': 'colon', 'children': []}; {'id': '61', 'type': 'binary_operator', 'children': ['62', '63'], 'value': '+'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '69']}; {'id': '66', 'type': 'subscript', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'newBytes'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '69', 'type': 'binary_operator', 'children': ['70', '73'], 'value': '+'}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'newBytes'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'changeIndex'}; {'id': '73', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '74', 'type': 'return_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'newBytes'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'tostring'}; {'id': '79', 'type': 'argument_list', 'children': []} | Returns a String that sorts just after all Strings beginning with a prefix |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_contributor_sort_value'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '38']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'contributor'}; {'id': '13', 'type': 'if_statement', 'children': ['14', '21', '30']}; {'id': '14', 'type': 'boolean_operator', 'children': ['15', '18'], 'value': 'or'}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'first_name'}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'last_name'}; {'id': '21', 'type': 'block', 'children': ['22']}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'contributor'}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'get_full_name'}; {'id': '29', 'type': 'argument_list', 'children': []}; {'id': '30', 'type': 'else_clause', 'children': ['31']}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'contributor'}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'username'}; {'id': '38', 'type': 'return_statement', 'children': ['39']}; {'id': '39', 'type': 'call', 'children': ['40', '47']}; {'id': '40', 'type': 'attribute', 'children': ['41', '46']}; {'id': '41', 'type': 'call', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'contributor'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '45', 'type': 'argument_list', 'children': []}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '47', 'type': 'argument_list', 'children': []} | Generate display name for contributor. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sorted_actions'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '35', '63']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '8', '31']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '10', 'type': 'argument_list', 'children': ['11', '28']}; {'id': '11', 'type': 'lambda', 'children': ['12', '14']}; {'id': '12', 'type': 'lambda_parameters', 'children': ['13']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '14', 'type': 'boolean_operator', 'children': ['15', '19', '20'], 'value': 'and'}; {'id': '15', 'type': 'not_operator', 'children': ['16']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'last'}; {'id': '19', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '20', 'type': 'not_operator', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'is_action'}; {'id': '25', 'type': 'argument_list', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '27', 'type': 'string', 'children': [], 'value': "'parsers'"}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': '_actions'}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'yield', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '35', 'type': 'for_statement', 'children': ['36', '37', '59']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '37', 'type': 'call', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '39', 'type': 'argument_list', 'children': ['40', '56']}; {'id': '40', 'type': 'lambda', 'children': ['41', '43']}; {'id': '41', 'type': 'lambda_parameters', 'children': ['42']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '43', 'type': 'boolean_operator', 'children': ['44', '47', '48'], 'value': 'and'}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'last'}; {'id': '47', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '48', 'type': 'not_operator', 'children': ['49']}; {'id': '49', 'type': 'call', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'is_action'}; {'id': '53', 'type': 'argument_list', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '55', 'type': 'string', 'children': [], 'value': "'parsers'"}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': '_actions'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'yield', 'children': ['62']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '63', 'type': 'for_statement', 'children': ['64', '65', '81']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '65', 'type': 'call', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '67', 'type': 'argument_list', 'children': ['68', '78']}; {'id': '68', 'type': 'lambda', 'children': ['69', '71']}; {'id': '69', 'type': 'lambda_parameters', 'children': ['70']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '71', 'type': 'call', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'is_action'}; {'id': '75', 'type': 'argument_list', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '77', 'type': 'string', 'children': [], 'value': "'parsers'"}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': '_actions'}; {'id': '81', 'type': 'block', 'children': ['82']}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'yield', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'a'} | Generate the sorted list of actions based on the "last" attribute. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sorted_by_field'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'issues'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '7', 'type': 'string', 'children': [], 'value': "'closed_at'"}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '10', 'type': 'False', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '15', 'type': 'argument_list', 'children': ['16', '17', '25']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'issues'}; {'id': '17', 'type': 'keyword_argument', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '19', 'type': 'lambda', 'children': ['20', '22']}; {'id': '20', 'type': 'lambda_parameters', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '22', 'type': 'subscript', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '25', 'type': 'keyword_argument', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'reverse'} | Return a list of issues sorted by closing date date. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_process'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '6', 'type': 'block', 'children': ['7', '19', '30', '49', '58']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '12']}; {'id': '9', 'type': 'pattern_list', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'mlh'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'mlw'}; {'id': '12', 'type': 'expression_list', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'max_line_height'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'max_line_width'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'astype'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'uint32'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '33', 'type': 'binary_operator', 'children': ['34', '44'], 'value': '+'}; {'id': '34', 'type': 'binary_operator', 'children': ['35', '36'], 'value': '*'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'mlw'}; {'id': '36', 'type': '()', 'children': ['37']}; {'id': '37', 'type': 'binary_operator', 'children': ['38', '43'], 'value': '//'}; {'id': '38', 'type': 'subscript', 'children': ['39', '40', '42']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '40', 'type': 'slice', 'children': ['41']}; {'id': '41', 'type': 'colon', 'children': []}; {'id': '42', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'mlh'}; {'id': '44', 'type': 'subscript', 'children': ['45', '46', '48']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '46', 'type': 'slice', 'children': ['47']}; {'id': '47', 'type': 'colon', 'children': []}; {'id': '48', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'sort_order'}; {'id': '52', 'type': 'call', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'argsort'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '58', 'type': 'return_statement', 'children': ['59']}; {'id': '59', 'type': 'subscript', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'sort_order'} | sort segments in read order - left to right, up to down |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'write_csv'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '23', '36', '49', '60', '68', '74']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'sort_sections'}; {'id': '14', 'type': 'argument_list', 'children': ['15']}; {'id': '15', 'type': 'list', 'children': ['16', '17', '18', '19', '20', '21', '22'], 'value': "['Root', 'Contacts', 'Documentation', 'References', 'Resources', 'Citations', 'Schema']"}; {'id': '16', 'type': 'string', 'children': [], 'value': "'Root'"}; {'id': '17', 'type': 'string', 'children': [], 'value': "'Contacts'"}; {'id': '18', 'type': 'string', 'children': [], 'value': "'Documentation'"}; {'id': '19', 'type': 'string', 'children': [], 'value': "'References'"}; {'id': '20', 'type': 'string', 'children': [], 'value': "'Resources'"}; {'id': '21', 'type': 'string', 'children': [], 'value': "'Citations'"}; {'id': '22', 'type': 'string', 'children': [], 'value': "'Schema'"}; {'id': '23', 'type': 'if_statement', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'abstract'}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'abstract'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '52', 'type': 'call', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'subscript', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '56', 'type': 'string', 'children': [], 'value': "'Root'"}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'get_or_new_term'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'Root.Modified'"}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '65', 'type': 'call', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'datetime_now'}; {'id': '67', 'type': 'argument_list', 'children': []}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'call', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'sort_by_term'}; {'id': '73', 'type': 'argument_list', 'children': []}; {'id': '74', 'type': 'return_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '81']}; {'id': '76', 'type': 'attribute', 'children': ['77', '80']}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '79', 'type': 'argument_list', 'children': []}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'write_csv'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'call', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '84', 'type': 'argument_list', 'children': ['85']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'path'} | Write CSV file. Sorts the sections before calling the superclass write_csv |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_listing'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '97', '117']}; {'id': '6', 'type': 'function_definition', 'children': ['7', '8', '11']}; {'id': '7', 'type': 'function_name', 'children': [], 'value': 'func_entry'}; {'id': '8', 'type': 'parameters', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'func'}; {'id': '11', 'type': 'block', 'children': ['12', '24', '50', '70']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '18']}; {'id': '14', 'type': 'pattern_list', 'children': ['15', '16', '17']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'varargs'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'defaults'}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': '_get_arg_spec'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'func'}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '27', 'type': 'list_comprehension', 'children': ['28', '43', '46']}; {'id': '28', 'type': 'dictionary', 'children': ['29', '35', '40']}; {'id': '29', 'type': 'pair', 'children': ['30', '31']}; {'id': '30', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '35', 'type': 'pair', 'children': ['36', '37']}; {'id': '36', 'type': 'string', 'children': [], 'value': "'optional'"}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '39'], 'value': 'in'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'defaults'}; {'id': '40', 'type': 'pair', 'children': ['41', '42']}; {'id': '41', 'type': 'string', 'children': [], 'value': "'vararg'"}; {'id': '42', 'type': 'False', 'children': []}; {'id': '43', 'type': 'for_in_clause', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '46', 'type': 'if_clause', 'children': ['47']}; {'id': '47', 'type': 'comparison_operator', 'children': ['48', '49'], 'value': '!='}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '49', 'type': 'string', 'children': [], 'value': "'ctx'"}; {'id': '50', 'type': 'if_statement', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'varargs'}; {'id': '52', 'type': 'block', 'children': ['53']}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'augmented_assignment', 'children': ['55', '56'], 'value': '+='}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '56', 'type': 'list', 'children': ['57'], 'value': "[{'name': str(varargs), 'optional': False, 'vararg': True}]"}; {'id': '57', 'type': 'dictionary', 'children': ['58', '64', '67']}; {'id': '58', 'type': 'pair', 'children': ['59', '60']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'varargs'}; {'id': '64', 'type': 'pair', 'children': ['65', '66']}; {'id': '65', 'type': 'string', 'children': [], 'value': "'optional'"}; {'id': '66', 'type': 'False', 'children': []}; {'id': '67', 'type': 'pair', 'children': ['68', '69']}; {'id': '68', 'type': 'string', 'children': [], 'value': "'vararg'"}; {'id': '69', 'type': 'True', 'children': []}; {'id': '70', 'type': 'return_statement', 'children': ['71']}; {'id': '71', 'type': 'dictionary', 'children': ['72', '82', '94']}; {'id': '72', 'type': 'pair', 'children': ['73', '74']}; {'id': '73', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'upper'}; {'id': '81', 'type': 'argument_list', 'children': []}; {'id': '82', 'type': 'pair', 'children': ['83', '84']}; {'id': '83', 'type': 'string', 'children': [], 'value': "'description'"}; {'id': '84', 'type': 'call', 'children': ['85', '93']}; {'id': '85', 'type': 'attribute', 'children': ['86', '92']}; {'id': '86', 'type': 'call', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '88', 'type': 'argument_list', 'children': ['89']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'func'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': '__doc__'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '93', 'type': 'argument_list', 'children': []}; {'id': '94', 'type': 'pair', 'children': ['95', '96']}; {'id': '95', 'type': 'string', 'children': [], 'value': "'params'"}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'assignment', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'listing'}; {'id': '100', 'type': 'list_comprehension', 'children': ['101', '106']}; {'id': '101', 'type': 'call', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'func_entry'}; {'id': '103', 'type': 'argument_list', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'f_name'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '106', 'type': 'for_in_clause', 'children': ['107', '110']}; {'id': '107', 'type': 'pattern_list', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'f_name'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '110', 'type': 'call', 'children': ['111', '116']}; {'id': '111', 'type': 'attribute', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': '_functions'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '116', 'type': 'argument_list', 'children': []}; {'id': '117', 'type': 'return_statement', 'children': ['118']}; {'id': '118', 'type': 'call', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '120', 'type': 'argument_list', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'listing'}; {'id': '122', 'type': 'keyword_argument', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '124', 'type': 'lambda', 'children': ['125', '127']}; {'id': '125', 'type': 'lambda_parameters', 'children': ['126']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '127', 'type': 'subscript', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '129', 'type': 'string', 'children': [], 'value': "'name'"} | Builds a listing of all functions sorted A-Z, with their names and descriptions |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'logs'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '22', '34', '48']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '13']}; {'id': '7', 'type': 'not_operator', 'children': ['8']}; {'id': '8', 'type': 'attribute', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'loaded'}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'call', 'children': ['16', '21']}; {'id': '16', 'type': 'attribute', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '21', 'type': 'argument_list', 'children': []}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'logs'}; {'id': '25', 'type': 'attribute', 'children': ['26', '33']}; {'id': '26', 'type': 'attribute', 'children': ['27', '32']}; {'id': '27', 'type': 'attribute', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'logs_dir'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'flat_directories'}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'logs'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'keyword_argument', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '42', 'type': 'lambda', 'children': ['43', '45']}; {'id': '43', 'type': 'lambda_parameters', 'children': ['44']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'mod_time'}; {'id': '48', 'type': 'return_statement', 'children': ['49']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'logs'} | Find the log directory and return all the logs sorted. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_elementary_intervals'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'features'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '61', '71', '77']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'coords'}; {'id': '10', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '11', 'type': 'try_statement', 'children': ['12', '48']}; {'id': '12', 'type': 'block', 'children': ['13']}; {'id': '13', 'type': 'for_statement', 'children': ['14', '15', '16']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'features'}; {'id': '16', 'type': 'block', 'children': ['17', '35']}; {'id': '17', 'type': 'if_statement', 'children': ['18', '24']}; {'id': '18', 'type': 'comparison_operator', 'children': ['19', '23'], 'value': '!='}; {'id': '19', 'type': 'call', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '23', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'raise_statement', 'children': ['26']}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'SyntaxError'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'binary_operator', 'children': ['30', '31'], 'value': '%'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'Interval malformed %s. Allways specify start and end position for interval.'"}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'coords'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'list', 'children': ['42', '45'], 'value': '[interval[0],interval[1]]'}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '44', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '47', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '48', 'type': 'except_clause', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'raise_statement', 'children': ['52']}; {'id': '52', 'type': 'call', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'SyntaxError'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'binary_operator', 'children': ['56', '57'], 'value': '%'}; {'id': '56', 'type': 'string', 'children': [], 'value': "'Interval malformed %s. Allways specify start and end position for interval.'"}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'interval'}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'coords'}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '66', 'type': 'argument_list', 'children': ['67']}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'coords'}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'coords'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '76', 'type': 'argument_list', 'children': []}; {'id': '77', 'type': 'return_statement', 'children': ['78']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'coords'} | Generates a sorted list of elementary intervals |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_tidy'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'type', 'children': ['6']}; {'id': '6', 'type': 'None', 'children': []}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '12', '22']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'no_overlap'}; {'id': '12', 'type': 'block', 'children': ['13']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'remove_overlap'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'no_contiguous'}; {'id': '22', 'type': 'else_clause', 'children': ['23']}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': '_sort'}; {'id': '29', 'type': 'argument_list', 'children': []} | Removes overlaps, etc., and sorts. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_by_dependencies'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'exts'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '19', '29', '43', '161']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '14']}; {'id': '11', 'type': 'pattern_list', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'sorted_ext'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'features_from_sorted'}; {'id': '14', 'type': 'expression_list', 'children': ['15', '16']}; {'id': '15', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '18', 'type': 'argument_list', 'children': []}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'pending'}; {'id': '22', 'type': 'list_comprehension', 'children': ['23', '26']}; {'id': '23', 'type': 'tuple', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '25', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '26', 'type': 'for_in_clause', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'exts'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '32', 'type': 'conditional_expression', 'children': ['33', '39', '42'], 'value': 'if'}; {'id': '33', 'type': 'binary_operator', 'children': ['34', '38'], 'value': '*'}; {'id': '34', 'type': 'call', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'exts'}; {'id': '38', 'type': 'integer', 'children': [], 'value': '100'}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '41'], 'value': 'is'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '41', 'type': 'None', 'children': []}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '43', 'type': 'while_statement', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'pending'}; {'id': '45', 'type': 'block', 'children': ['46', '57', '89', '97']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '51']}; {'id': '48', 'type': 'pattern_list', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'pending'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '57', 'type': 'if_statement', 'children': ['58', '71']}; {'id': '58', 'type': 'boolean_operator', 'children': ['59', '65'], 'value': 'and'}; {'id': '59', 'type': 'not_operator', 'children': ['60']}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '62', 'type': 'argument_list', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'Extractor'}; {'id': '65', 'type': 'not_operator', 'children': ['66']}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'issubclass'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'Extractor'}; {'id': '71', 'type': 'block', 'children': ['72', '76']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '75', 'type': 'string', 'children': [], 'value': '"Only Extractor instances are allowed. Found {}."'}; {'id': '76', 'type': 'raise_statement', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'call', 'children': ['81', '84']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '84', 'type': 'argument_list', 'children': ['85']}; {'id': '85', 'type': 'call', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '89', 'type': 'expression_statement', 'children': ['90']}; {'id': '90', 'type': 'assignment', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'deps'}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'get_dependencies'}; {'id': '96', 'type': 'argument_list', 'children': []}; {'id': '97', 'type': 'if_statement', 'children': ['98', '104', '141']}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'deps'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'difference'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'features_from_sorted'}; {'id': '104', 'type': 'block', 'children': ['105', '130']}; {'id': '105', 'type': 'if_statement', 'children': ['106', '111']}; {'id': '106', 'type': 'comparison_operator', 'children': ['107', '110'], 'value': '>'}; {'id': '107', 'type': 'binary_operator', 'children': ['108', '109'], 'value': '+'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '109', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '111', 'type': 'block', 'children': ['112', '116']}; {'id': '112', 'type': 'expression_statement', 'children': ['113']}; {'id': '113', 'type': 'assignment', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '115', 'type': 'string', 'children': [], 'value': '"Maximun retry ({}) to sort achieved from extractor {}."'}; {'id': '116', 'type': 'raise_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'RuntimeError'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'call', 'children': ['121', '124']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '124', 'type': 'argument_list', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'retry'}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'call', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'pending'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '135', 'type': 'argument_list', 'children': ['136']}; {'id': '136', 'type': 'tuple', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '138', 'type': 'binary_operator', 'children': ['139', '140'], 'value': '+'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '140', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '141', 'type': 'else_clause', 'children': ['142']}; {'id': '142', 'type': 'block', 'children': ['143', '150']}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'sorted_ext'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'call', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'features_from_sorted'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'get_features'}; {'id': '160', 'type': 'argument_list', 'children': []}; {'id': '161', 'type': 'return_statement', 'children': ['162']}; {'id': '162', 'type': 'call', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'sorted_ext'} | Calculate the Feature Extractor Resolution Order. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sort_layers'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': '_layers'}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'OrderedDict'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '24']}; {'id': '17', 'type': 'call', 'children': ['18', '23']}; {'id': '18', 'type': 'attribute', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': '_layers'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '23', 'type': 'argument_list', 'children': []}; {'id': '24', 'type': 'keyword_argument', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '26', 'type': 'lambda', 'children': ['27', '29']}; {'id': '27', 'type': 'lambda_parameters', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '29', 'type': 'subscript', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '31', 'type': 'integer', 'children': [], 'value': '0'} | Sort the layers by depth. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'handle_keypress'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '11', '24', '37', '50']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '10'], 'value': '=='}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '10', 'type': 'string', 'children': [], 'value': '"esc"'}; {'id': '11', 'type': 'block', 'children': ['12', '18']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'save_file'}; {'id': '17', 'type': 'argument_list', 'children': []}; {'id': '18', 'type': 'raise_statement', 'children': ['19']}; {'id': '19', 'type': 'call', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'urwid'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'ExitMainLoop'}; {'id': '23', 'type': 'argument_list', 'children': []}; {'id': '24', 'type': 'elif_clause', 'children': ['25', '28']}; {'id': '25', 'type': 'comparison_operator', 'children': ['26', '27'], 'value': '=='}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '27', 'type': 'string', 'children': [], 'value': '"delete"'}; {'id': '28', 'type': 'block', 'children': ['29']}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '36']}; {'id': '31', 'type': 'attribute', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'walker'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'combine_focus_with_next'}; {'id': '36', 'type': 'argument_list', 'children': []}; {'id': '37', 'type': 'elif_clause', 'children': ['38', '41']}; {'id': '38', 'type': 'comparison_operator', 'children': ['39', '40'], 'value': '=='}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '40', 'type': 'string', 'children': [], 'value': '"backspace"'}; {'id': '41', 'type': 'block', 'children': ['42']}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '49']}; {'id': '44', 'type': 'attribute', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'walker'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'combine_focus_with_prev'}; {'id': '49', 'type': 'argument_list', 'children': []}; {'id': '50', 'type': 'elif_clause', 'children': ['51', '54']}; {'id': '51', 'type': 'comparison_operator', 'children': ['52', '53'], 'value': '=='}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '53', 'type': 'string', 'children': [], 'value': '"enter"'}; {'id': '54', 'type': 'block', 'children': ['55', '63', '73']}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '62']}; {'id': '57', 'type': 'attribute', 'children': ['58', '61']}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'walker'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'split_focus'}; {'id': '62', 'type': 'argument_list', 'children': []}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '70']}; {'id': '65', 'type': 'attribute', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'view'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'keypress'}; {'id': '70', 'type': 'argument_list', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '72', 'type': 'string', 'children': [], 'value': '"down"'}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'call', 'children': ['75', '80']}; {'id': '75', 'type': 'attribute', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'view'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'keypress'}; {'id': '80', 'type': 'argument_list', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '82', 'type': 'string', 'children': [], 'value': '"home"'} | Last resort for keypresses. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_cantons'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '9', 'type': 'argument_list', 'children': ['10']}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'list_comprehension', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'canton'}; {'id': '20', 'type': 'for_in_clause', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '22', 'type': 'call', 'children': ['23', '30']}; {'id': '23', 'type': 'attribute', 'children': ['24', '29']}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'get_locations'}; {'id': '28', 'type': 'argument_list', 'children': []}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '30', 'type': 'argument_list', 'children': []} | Return the list of unique cantons, sorted by name. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_municipalities'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '9', 'type': 'argument_list', 'children': ['10']}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'list_comprehension', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'municipality'}; {'id': '20', 'type': 'for_in_clause', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '22', 'type': 'call', 'children': ['23', '30']}; {'id': '23', 'type': 'attribute', 'children': ['24', '29']}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'get_locations'}; {'id': '28', 'type': 'argument_list', 'children': []}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '30', 'type': 'argument_list', 'children': []} | Return the list of unique municipalities, sorted by name. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'attr'}; {'id': '6', 'type': 'block', 'children': ['7', '26']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '12', 'type': 'call', 'children': ['13', '25']}; {'id': '13', 'type': 'attribute', 'children': ['14', '24']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'Sorter'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '20', '23']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'category'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'attr'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'sort_entries'}; {'id': '25', 'type': 'argument_list', 'children': []}; {'id': '26', 'type': 'return_statement', 'children': ['27']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'} | Sort the ratings based on an attribute |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_entries'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '9', 'type': 'argument_list', 'children': ['10', '13', '18']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '13', 'type': 'keyword_argument', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'sort_func'}; {'id': '18', 'type': 'keyword_argument', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'get_reverse'}; {'id': '24', 'type': 'argument_list', 'children': []} | Get whether reverse is True or False. Return the sorted data. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_matches'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '5', 'type': 'block', 'children': ['6', '8', '30', '54']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'string', 'children': [], 'value': "'''Sorts a ``list`` of matches best to worst'''"}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'multipliers'}; {'id': '11', 'type': 'dictionary', 'children': ['12', '17', '22', '27']}; {'id': '12', 'type': 'pair', 'children': ['13', '14']}; {'id': '13', 'type': 'string', 'children': [], 'value': "'exact'"}; {'id': '14', 'type': 'binary_operator', 'children': ['15', '16'], 'value': '**'}; {'id': '15', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '16', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '17', 'type': 'pair', 'children': ['18', '19']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'fname'"}; {'id': '19', 'type': 'binary_operator', 'children': ['20', '21'], 'value': '**'}; {'id': '20', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '21', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '22', 'type': 'pair', 'children': ['23', '24']}; {'id': '23', 'type': 'string', 'children': [], 'value': "'fuzzy'"}; {'id': '24', 'type': 'binary_operator', 'children': ['25', '26'], 'value': '**'}; {'id': '25', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '26', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '27', 'type': 'pair', 'children': ['28', '29']}; {'id': '28', 'type': 'string', 'children': [], 'value': "'fuzzy_fragment'"}; {'id': '29', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '33', 'type': 'list_comprehension', 'children': ['34', '51']}; {'id': '34', 'type': 'tuple', 'children': ['35', '50']}; {'id': '35', 'type': 'binary_operator', 'children': ['36', '41'], 'value': '*'}; {'id': '36', 'type': 'subscript', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'multipliers'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '41', 'type': '()', 'children': ['42']}; {'id': '42', 'type': 'conditional_expression', 'children': ['43', '46', '49'], 'value': 'if'}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'amount'}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'amount'}; {'id': '49', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '51', 'type': 'for_in_clause', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '54', 'type': 'return_statement', 'children': ['55']}; {'id': '55', 'type': 'list_comprehension', 'children': ['56', '59']}; {'id': '56', 'type': 'subscript', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '58', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '59', 'type': 'for_in_clause', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '61', 'type': 'call', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '63', 'type': 'argument_list', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '65', 'type': 'keyword_argument', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '67', 'type': 'True', 'children': []} | Sorts a ``list`` of matches best to worst |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sort_modules'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '5', 'type': 'block', 'children': ['6', '56']}; {'id': '6', 'type': 'function_definition', 'children': ['7', '8', '11']}; {'id': '7', 'type': 'function_name', 'children': [], 'value': 'compare'}; {'id': '8', 'type': 'parameters', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '11', 'type': 'block', 'children': ['12', '18', '24', '31', '40', '54']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '15', 'type': 'subscript', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '17', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '21', 'type': 'subscript', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '23', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '24', 'type': 'if_statement', 'children': ['25', '28']}; {'id': '25', 'type': 'comparison_operator', 'children': ['26', '27'], 'value': '=='}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '28', 'type': 'block', 'children': ['29']}; {'id': '29', 'type': 'return_statement', 'children': ['30']}; {'id': '30', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '31', 'type': 'if_statement', 'children': ['32', '37']}; {'id': '32', 'type': 'comparison_operator', 'children': ['33', '36'], 'value': '=='}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'stem'}; {'id': '36', 'type': 'string', 'children': [], 'value': '"__init__.py"'}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'return_statement', 'children': ['39']}; {'id': '39', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '40', 'type': 'if_statement', 'children': ['41', '50']}; {'id': '41', 'type': 'boolean_operator', 'children': ['42', '47'], 'value': 'or'}; {'id': '42', 'type': 'comparison_operator', 'children': ['43', '46'], 'value': '=='}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'stem'}; {'id': '46', 'type': 'string', 'children': [], 'value': '"__init__.py"'}; {'id': '47', 'type': 'comparison_operator', 'children': ['48', '49'], 'value': '<'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'return_statement', 'children': ['52']}; {'id': '52', 'type': 'unary_operator', 'children': ['53'], 'value': '-'}; {'id': '53', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '54', 'type': 'return_statement', 'children': ['55']}; {'id': '55', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '56', 'type': 'return_statement', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '61', 'type': 'keyword_argument', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '63', 'type': 'call', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'cmp_to_key'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'compare'} | Always sort `index` or `README` as first filename in list. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__calculate_edge_weights'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '16', '38']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '9', 'type': 'subscript', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '11', 'type': 'string', 'children': [], 'value': "'graph'"}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'weights'}; {'id': '15', 'type': 'dictionary', 'children': []}; {'id': '16', 'type': 'for_statement', 'children': ['17', '18', '23']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'get_all_edge_ids'}; {'id': '22', 'type': 'argument_list', 'children': []}; {'id': '23', 'type': 'block', 'children': ['24', '32']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'edge_weight'}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': '__edge_weight'}; {'id': '29', 'type': 'argument_list', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '37']}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'weights'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'edge_weight'}; {'id': '38', 'type': 'return_statement', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'weights'} | Calculates the weight of each edge, for embedding-order sorting. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__sort_adjacency_lists'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '16', '22', '28', '121']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'new_adjacency_lists'}; {'id': '9', 'type': 'dictionary', 'children': []}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'adjacency_lists'}; {'id': '13', 'type': 'subscript', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '15', 'type': 'string', 'children': [], 'value': "'adj'"}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'edge_weights'}; {'id': '19', 'type': 'subscript', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '21', 'type': 'string', 'children': [], 'value': "'edge_weights'"}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'edge_lookup'}; {'id': '25', 'type': 'subscript', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '27', 'type': 'string', 'children': [], 'value': "'edge_lookup'"}; {'id': '28', 'type': 'for_statement', 'children': ['29', '32', '40']}; {'id': '29', 'type': 'pattern_list', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'adj_list'}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'adjacency_lists'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '39', 'type': 'argument_list', 'children': []}; {'id': '40', 'type': 'block', 'children': ['41', '45', '49', '86', '101', '115']}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'node_weight_lookup'}; {'id': '44', 'type': 'dictionary', 'children': []}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'frond_lookup'}; {'id': '48', 'type': 'dictionary', 'children': []}; {'id': '49', 'type': 'for_statement', 'children': ['50', '51', '52']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'node_b'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'adj_list'}; {'id': '52', 'type': 'block', 'children': ['53', '65', '73']}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '56', 'type': 'call', 'children': ['57', '62']}; {'id': '57', 'type': 'attribute', 'children': ['58', '61']}; {'id': '58', 'type': 'subscript', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '60', 'type': 'string', 'children': [], 'value': "'graph'"}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'get_first_edge_id_by_node_ids'}; {'id': '62', 'type': 'argument_list', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'node_b'}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'assignment', 'children': ['67', '70']}; {'id': '67', 'type': 'subscript', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'node_weight_lookup'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'node_b'}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'edge_weights'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '78']}; {'id': '75', 'type': 'subscript', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'frond_lookup'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'node_b'}; {'id': '78', 'type': 'conditional_expression', 'children': ['79', '80', '85'], 'value': 'if'}; {'id': '79', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '84'], 'value': '=='}; {'id': '81', 'type': 'subscript', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'edge_lookup'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '84', 'type': 'string', 'children': [], 'value': "'backedge'"}; {'id': '85', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '86', 'type': 'expression_statement', 'children': ['87']}; {'id': '87', 'type': 'assignment', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'new_list'}; {'id': '89', 'type': 'call', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '91', 'type': 'argument_list', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'adj_list'}; {'id': '93', 'type': 'keyword_argument', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '95', 'type': 'lambda', 'children': ['96', '98']}; {'id': '96', 'type': 'lambda_parameters', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '98', 'type': 'subscript', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'frond_lookup'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'call', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'new_list'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'keyword_argument', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '109', 'type': 'lambda', 'children': ['110', '112']}; {'id': '110', 'type': 'lambda_parameters', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '112', 'type': 'subscript', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'node_weight_lookup'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '120']}; {'id': '117', 'type': 'subscript', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'new_adjacency_lists'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'new_list'}; {'id': '121', 'type': 'return_statement', 'children': ['122']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'new_adjacency_lists'} | Sorts the adjacency list representation by the edge weights. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__edge_weight'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '19', '28', '36', '44', '52', '60', '68']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '10', 'type': 'subscript', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '12', 'type': 'string', 'children': [], 'value': "'graph'"}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'edge_lookup'}; {'id': '16', 'type': 'subscript', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '18', 'type': 'string', 'children': [], 'value': "'edge_lookup'"}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'edge'}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'get_edge'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '33']}; {'id': '30', 'type': 'pattern_list', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '33', 'type': 'subscript', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'edge'}; {'id': '35', 'type': 'string', 'children': [], 'value': "'vertices'"}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'd_u'}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'D'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'd_v'}; {'id': '47', 'type': 'call', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'D'}; {'id': '49', 'type': 'argument_list', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'lp_1'}; {'id': '55', 'type': 'call', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'L1'}; {'id': '57', 'type': 'argument_list', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'd_lp_1'}; {'id': '63', 'type': 'call', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'D'}; {'id': '65', 'type': 'argument_list', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'lp_1'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '68', 'type': 'if_statement', 'children': ['69', '78', '83', '95', '109']}; {'id': '69', 'type': 'boolean_operator', 'children': ['70', '75'], 'value': 'and'}; {'id': '70', 'type': 'comparison_operator', 'children': ['71', '74'], 'value': '=='}; {'id': '71', 'type': 'subscript', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'edge_lookup'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'edge_id'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'backedge'"}; {'id': '75', 'type': 'comparison_operator', 'children': ['76', '77'], 'value': '<'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'd_v'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'd_u'}; {'id': '78', 'type': 'block', 'children': ['79']}; {'id': '79', 'type': 'return_statement', 'children': ['80']}; {'id': '80', 'type': 'binary_operator', 'children': ['81', '82'], 'value': '*'}; {'id': '81', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'd_v'}; {'id': '83', 'type': 'elif_clause', 'children': ['84', '90']}; {'id': '84', 'type': 'call', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'is_type_I_branch'}; {'id': '86', 'type': 'argument_list', 'children': ['87', '88', '89']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'return_statement', 'children': ['92']}; {'id': '92', 'type': 'binary_operator', 'children': ['93', '94'], 'value': '*'}; {'id': '93', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'd_lp_1'}; {'id': '95', 'type': 'elif_clause', 'children': ['96', '102']}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'is_type_II_branch'}; {'id': '98', 'type': 'argument_list', 'children': ['99', '100', '101']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'dfs_data'}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'return_statement', 'children': ['104']}; {'id': '104', 'type': 'binary_operator', 'children': ['105', '108'], 'value': '+'}; {'id': '105', 'type': 'binary_operator', 'children': ['106', '107'], 'value': '*'}; {'id': '106', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'd_lp_1'}; {'id': '108', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '109', 'type': 'else_clause', 'children': ['110']}; {'id': '110', 'type': 'block', 'children': ['111']}; {'id': '111', 'type': 'return_statement', 'children': ['112']}; {'id': '112', 'type': 'binary_operator', 'children': ['113', '120'], 'value': '+'}; {'id': '113', 'type': 'binary_operator', 'children': ['114', '115'], 'value': '*'}; {'id': '114', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'num_nodes'}; {'id': '119', 'type': 'argument_list', 'children': []}; {'id': '120', 'type': 'integer', 'children': [], 'value': '1'} | Calculates the edge weight used to sort edges. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sortBy'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '13', '66']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '12'], 'value': 'is'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '12', 'type': 'None', 'children': []}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'if_statement', 'children': ['15', '23', '49']}; {'id': '15', 'type': 'call', 'children': ['16', '22']}; {'id': '16', 'type': 'attribute', 'children': ['17', '21']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'isString'}; {'id': '22', 'type': 'argument_list', 'children': []}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': '_wrap'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '32', 'type': 'argument_list', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '36', 'type': 'keyword_argument', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '38', 'type': 'lambda', 'children': ['39', '43']}; {'id': '39', 'type': 'lambda_parameters', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '41', 'type': 'list_splat_pattern', 'children': ['42']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '49', 'type': 'else_clause', 'children': ['50']}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'return_statement', 'children': ['52']}; {'id': '52', 'type': 'call', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': '_wrap'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '63', 'type': 'keyword_argument', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '66', 'type': 'else_clause', 'children': ['67']}; {'id': '67', 'type': 'block', 'children': ['68']}; {'id': '68', 'type': 'return_statement', 'children': ['69']}; {'id': '69', 'type': 'call', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': '_wrap'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'obj'} | Sort the object's values by a criterion produced by an iterator. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'functions'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '42']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '9', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '10', 'type': 'for_statement', 'children': ['11', '14', '20']}; {'id': '11', 'type': 'pattern_list', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'if_statement', 'children': ['22', '34']}; {'id': '22', 'type': 'call', 'children': ['23', '33']}; {'id': '23', 'type': 'attribute', 'children': ['24', '32']}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'subscript', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'isCallable'}; {'id': '33', 'type': 'argument_list', 'children': []}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '42', 'type': 'return_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': '_wrap'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'call', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'names'} | Return a sorted list of the function names available on the object. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_bmu'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'activations'}; {'id': '6', 'type': 'block', 'children': ['7', '19', '29']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '13']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '12'], 'value': '=='}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'argfunc'}; {'id': '12', 'type': 'string', 'children': [], 'value': "'argmax'"}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'activations'}; {'id': '17', 'type': 'unary_operator', 'children': ['18'], 'value': '-'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'activations'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'argsort'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'activations'}; {'id': '28', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '29', 'type': 'return_statement', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'argsort'}; {'id': '34', 'type': 'argument_list', 'children': []} | Get indices of bmus, sorted by their distance from input. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'insort_no_dup'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'lst'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '6', 'type': 'block', 'children': ['7', '10', '20']}; {'id': '7', 'type': 'import_statement', 'children': ['8']}; {'id': '8', 'type': 'dotted_name', 'children': ['9']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'bisect'}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'ix'}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'bisect'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'bisect_left'}; {'id': '17', 'type': 'argument_list', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'lst'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '20', 'type': 'if_statement', 'children': ['21', '26']}; {'id': '21', 'type': 'comparison_operator', 'children': ['22', '25'], 'value': '!='}; {'id': '22', 'type': 'subscript', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'lst'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'ix'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '35']}; {'id': '29', 'type': 'subscript', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'lst'}; {'id': '31', 'type': 'slice', 'children': ['32', '33', '34']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'ix'}; {'id': '33', 'type': 'colon', 'children': []}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'ix'}; {'id': '35', 'type': 'list', 'children': ['36'], 'value': '[item]'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'item'} | If item is not in lst, add item to list at its sorted position |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'records'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'list_comprehension', 'children': ['8', '13']}; {'id': '8', 'type': 'subscript', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': '_records'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '13', 'type': 'for_in_clause', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': '_records'} | Returns a list of records in SORT_KEY order |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '19']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'patch_cursor'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cursor'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'batch_size'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '10', 'type': 'None', 'children': []}; {'id': '11', 'type': 'default_parameter', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'skip'}; {'id': '13', 'type': 'None', 'children': []}; {'id': '14', 'type': 'default_parameter', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '16', 'type': 'None', 'children': []}; {'id': '17', 'type': 'dictionary_splat_pattern', 'children': ['18']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '19', 'type': 'block', 'children': ['20', '35', '47', '59']}; {'id': '20', 'type': 'if_statement', 'children': ['21', '27']}; {'id': '21', 'type': 'comparison_operator', 'children': ['22', '26'], 'value': '=='}; {'id': '22', 'type': 'call', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'batch_size'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'call', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'cursor'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'batch_size'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'batch_size'}; {'id': '35', 'type': 'if_statement', 'children': ['36', '39']}; {'id': '36', 'type': 'comparison_operator', 'children': ['37', '38'], 'value': 'is'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '38', 'type': 'None', 'children': []}; {'id': '39', 'type': 'block', 'children': ['40']}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'call', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'cursor'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '47', 'type': 'if_statement', 'children': ['48', '51']}; {'id': '48', 'type': 'comparison_operator', 'children': ['49', '50'], 'value': 'is'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '50', 'type': 'None', 'children': []}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'cursor'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '57', 'type': 'argument_list', 'children': ['58']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '59', 'type': 'if_statement', 'children': ['60', '63']}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '62'], 'value': 'is'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'skip'}; {'id': '62', 'type': 'None', 'children': []}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'call', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'cursor'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'skip'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'skip'} | Adds batch_size, limit, sort parameters to a DB cursor |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__doc_cmp'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '6', 'type': 'block', 'children': ['7', '15', '26']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '11']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '10'], 'value': 'is'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '10', 'type': 'None', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': ['13']}; {'id': '13', 'type': 'unary_operator', 'children': ['14'], 'value': '-'}; {'id': '14', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '15', 'type': 'if_statement', 'children': ['16', '23']}; {'id': '16', 'type': 'boolean_operator', 'children': ['17', '20'], 'value': 'and'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'is_new'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'is_new'}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '26', 'type': 'if_statement', 'children': ['27', '34', '38', '49']}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '31'], 'value': '<'}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': '__docid'}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': '__docid'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'return_statement', 'children': ['36']}; {'id': '36', 'type': 'unary_operator', 'children': ['37'], 'value': '-'}; {'id': '37', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '38', 'type': 'elif_clause', 'children': ['39', '46']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '43'], 'value': '=='}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': '__docid'}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': '__docid'}; {'id': '46', 'type': 'block', 'children': ['47']}; {'id': '47', 'type': 'return_statement', 'children': ['48']}; {'id': '48', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '49', 'type': 'else_clause', 'children': ['50']}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'return_statement', 'children': ['52']}; {'id': '52', 'type': 'integer', 'children': [], 'value': '1'} | Comparison function. Can be used to sort docs alphabetically. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__label_cmp'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '6', 'type': 'block', 'children': ['7', '15', '28', '41', '60']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '11']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '10'], 'value': 'is'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '10', 'type': 'None', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': ['13']}; {'id': '13', 'type': 'unary_operator', 'children': ['14'], 'value': '-'}; {'id': '14', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'label_name'}; {'id': '18', 'type': 'call', 'children': ['19', '27']}; {'id': '19', 'type': 'attribute', 'children': ['20', '26']}; {'id': '20', 'type': 'call', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'strip_accents'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '27', 'type': 'argument_list', 'children': []}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'other_name'}; {'id': '31', 'type': 'call', 'children': ['32', '40']}; {'id': '32', 'type': 'attribute', 'children': ['33', '39']}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'strip_accents'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '40', 'type': 'argument_list', 'children': []}; {'id': '41', 'type': 'if_statement', 'children': ['42', '45', '49', '56']}; {'id': '42', 'type': 'comparison_operator', 'children': ['43', '44'], 'value': '<'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'label_name'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'other_name'}; {'id': '45', 'type': 'block', 'children': ['46']}; {'id': '46', 'type': 'return_statement', 'children': ['47']}; {'id': '47', 'type': 'unary_operator', 'children': ['48'], 'value': '-'}; {'id': '48', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '49', 'type': 'elif_clause', 'children': ['50', '53']}; {'id': '50', 'type': 'comparison_operator', 'children': ['51', '52'], 'value': '=='}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'label_name'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'other_name'}; {'id': '53', 'type': 'block', 'children': ['54']}; {'id': '54', 'type': 'return_statement', 'children': ['55']}; {'id': '55', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '56', 'type': 'else_clause', 'children': ['57']}; {'id': '57', 'type': 'block', 'children': ['58']}; {'id': '58', 'type': 'return_statement', 'children': ['59']}; {'id': '59', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '60', 'type': 'if_statement', 'children': ['61', '72', '76', '91']}; {'id': '61', 'type': 'comparison_operator', 'children': ['62', '67'], 'value': '<'}; {'id': '62', 'type': 'call', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'get_color_str'}; {'id': '66', 'type': 'argument_list', 'children': []}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'get_color_str'}; {'id': '71', 'type': 'argument_list', 'children': []}; {'id': '72', 'type': 'block', 'children': ['73']}; {'id': '73', 'type': 'return_statement', 'children': ['74']}; {'id': '74', 'type': 'unary_operator', 'children': ['75'], 'value': '-'}; {'id': '75', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '76', 'type': 'elif_clause', 'children': ['77', '88']}; {'id': '77', 'type': 'comparison_operator', 'children': ['78', '83'], 'value': '=='}; {'id': '78', 'type': 'call', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'get_color_str'}; {'id': '82', 'type': 'argument_list', 'children': []}; {'id': '83', 'type': 'call', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'other'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'get_color_str'}; {'id': '87', 'type': 'argument_list', 'children': []}; {'id': '88', 'type': 'block', 'children': ['89']}; {'id': '89', 'type': 'return_statement', 'children': ['90']}; {'id': '90', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '91', 'type': 'else_clause', 'children': ['92']}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'return_statement', 'children': ['94']}; {'id': '94', 'type': 'integer', 'children': [], 'value': '1'} | Comparaison function. Can be used to sort labels alphabetically. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'stop_sequence'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '9', 'type': 'argument_list', 'children': ['10', '15']}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'stop_times'}; {'id': '14', 'type': 'argument_list', 'children': []}; {'id': '15', 'type': 'keyword_argument', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '17', 'type': 'lambda', 'children': ['18', '20']}; {'id': '18', 'type': 'lambda_parameters', 'children': ['19']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '20', 'type': 'call', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'string', 'children': [], 'value': "'stop_sequence'"} | Return the sorted StopTimes for this trip. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'print_sorted_counter'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'counter'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '7', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'for_statement', 'children': ['10', '13', '30']}; {'id': '10', 'type': 'pattern_list', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '15', 'type': 'argument_list', 'children': ['16', '21', '27']}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'counter'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '20', 'type': 'argument_list', 'children': []}; {'id': '21', 'type': 'keyword_argument', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '23', 'type': 'call', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'itemgetter'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '27', 'type': 'keyword_argument', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '29', 'type': 'True', 'children': []}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'print_statement', 'children': ['32']}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'string', 'children': [], 'value': '"{0}{1} - {2}"'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '36', 'type': 'argument_list', 'children': ['37', '40', '41']}; {'id': '37', 'type': 'binary_operator', 'children': ['38', '39'], 'value': '*'}; {'id': '38', 'type': 'string', 'children': [], 'value': "'\\t'"}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'count'} | print all elements of a counter in descending order |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'list_splat_pattern', 'children': ['6']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '7', 'type': 'dictionary_splat_pattern', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '9', 'type': 'block', 'children': ['10', '22']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'call', 'children': ['12', '17']}; {'id': '12', 'type': 'attribute', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': '_list'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '17', 'type': 'argument_list', 'children': ['18', '20']}; {'id': '18', 'type': 'list_splat', 'children': ['19']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '20', 'type': 'dictionary_splat', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '22', 'type': 'for_statement', 'children': ['23', '26', '32']}; {'id': '23', 'type': 'pattern_list', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': '_list'}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '40']}; {'id': '35', 'type': 'subscript', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': '_dict'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'index'} | Sort this setlist in place. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'key'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '6', 'type': 'block', 'children': ['7', '9', '32', '54', '91', '115']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'string', 'children': [], 'value': '"Return the sort key for the given frame."'}; {'id': '9', 'type': 'function_definition', 'children': ['10', '11', '13']}; {'id': '10', 'type': 'function_name', 'children': [], 'value': 'keytuple'}; {'id': '11', 'type': 'parameters', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'primary'}; {'id': '13', 'type': 'block', 'children': ['14', '25']}; {'id': '14', 'type': 'if_statement', 'children': ['15', '20']}; {'id': '15', 'type': 'comparison_operator', 'children': ['16', '19'], 'value': 'is'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'frameno'}; {'id': '19', 'type': 'None', 'children': []}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'return_statement', 'children': ['22']}; {'id': '22', 'type': 'tuple', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'primary'}; {'id': '24', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '25', 'type': 'return_statement', 'children': ['26']}; {'id': '26', 'type': 'tuple', 'children': ['27', '28', '29']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'primary'}; {'id': '28', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'frameno'}; {'id': '32', 'type': 'if_statement', 'children': ['33', '41']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '38'], 'value': 'in'}; {'id': '34', 'type': 'call', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'frame_keys'}; {'id': '41', 'type': 'block', 'children': ['42']}; {'id': '42', 'type': 'return_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'keytuple'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'subscript', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'frame_keys'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '54', 'type': 'if_statement', 'children': ['55', '74']}; {'id': '55', 'type': 'boolean_operator', 'children': ['56', '62'], 'value': 'and'}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': '_in_version'}; {'id': '60', 'type': 'argument_list', 'children': ['61']}; {'id': '61', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '62', 'type': 'comparison_operator', 'children': ['63', '71'], 'value': 'in'}; {'id': '63', 'type': 'subscript', 'children': ['64', '70']}; {'id': '64', 'type': 'attribute', 'children': ['65', '69']}; {'id': '65', 'type': 'call', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': '__bases__'}; {'id': '70', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'frame_keys'}; {'id': '74', 'type': 'block', 'children': ['75']}; {'id': '75', 'type': 'return_statement', 'children': ['76']}; {'id': '76', 'type': 'call', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'keytuple'}; {'id': '78', 'type': 'argument_list', 'children': ['79']}; {'id': '79', 'type': 'subscript', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'frame_keys'}; {'id': '83', 'type': 'subscript', 'children': ['84', '90']}; {'id': '84', 'type': 'attribute', 'children': ['85', '89']}; {'id': '85', 'type': 'call', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': '__bases__'}; {'id': '90', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '91', 'type': 'for_statement', 'children': ['92', '95', '98']}; {'id': '92', 'type': 'tuple_pattern', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 're_keys'}; {'id': '98', 'type': 'block', 'children': ['99']}; {'id': '99', 'type': 'if_statement', 'children': ['100', '109']}; {'id': '100', 'type': 'call', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '104', 'type': 'argument_list', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'frame'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'frameid'}; {'id': '109', 'type': 'block', 'children': ['110']}; {'id': '110', 'type': 'return_statement', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'keytuple'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '115', 'type': 'return_statement', 'children': ['116']}; {'id': '116', 'type': 'call', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'keytuple'}; {'id': '118', 'type': 'argument_list', 'children': ['119']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'unknown_key'} | Return the sort key for the given frame. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'make_node_dict'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'outer_list'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '7', 'type': 'string', 'children': [], 'value': '"zone"'}; {'id': '8', 'type': 'block', 'children': ['9', '13', '17', '35', '115', '119', '123', '143']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'raw_dict'}; {'id': '12', 'type': 'dictionary', 'children': []}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '16', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '17', 'type': 'for_statement', 'children': ['18', '19', '20']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'inner_list'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'outer_list'}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'for_statement', 'children': ['22', '23', '24']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'inner_list'}; {'id': '24', 'type': 'block', 'children': ['25', '31']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '30']}; {'id': '27', 'type': 'subscript', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'raw_dict'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'augmented_assignment', 'children': ['33', '34'], 'value': '+='}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '34', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '35', 'type': 'if_statement', 'children': ['36', '39', '74']}; {'id': '36', 'type': 'comparison_operator', 'children': ['37', '38'], 'value': '=='}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '38', 'type': 'string', 'children': [], 'value': '"name"'}; {'id': '39', 'type': 'block', 'children': ['40']}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'srt_dict'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'OrderedDict'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '48', 'type': 'argument_list', 'children': ['49', '54']}; {'id': '49', 'type': 'call', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'raw_dict'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '53', 'type': 'argument_list', 'children': []}; {'id': '54', 'type': 'keyword_argument', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '56', 'type': 'lambda', 'children': ['57', '59']}; {'id': '57', 'type': 'lambda_parameters', 'children': ['58']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '59', 'type': 'tuple', 'children': ['60', '65']}; {'id': '60', 'type': 'attribute', 'children': ['61', '64']}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '65', 'type': 'call', 'children': ['66', '73']}; {'id': '66', 'type': 'attribute', 'children': ['67', '72']}; {'id': '67', 'type': 'attribute', 'children': ['68', '71']}; {'id': '68', 'type': 'subscript', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '70', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '73', 'type': 'argument_list', 'children': []}; {'id': '74', 'type': 'else_clause', 'children': ['75']}; {'id': '75', 'type': 'block', 'children': ['76']}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'srt_dict'}; {'id': '79', 'type': 'call', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'OrderedDict'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'call', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '84', 'type': 'argument_list', 'children': ['85', '90']}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'raw_dict'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '89', 'type': 'argument_list', 'children': []}; {'id': '90', 'type': 'keyword_argument', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '92', 'type': 'lambda', 'children': ['93', '95']}; {'id': '93', 'type': 'lambda_parameters', 'children': ['94']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '95', 'type': 'tuple', 'children': ['96', '101', '106']}; {'id': '96', 'type': 'attribute', 'children': ['97', '100']}; {'id': '97', 'type': 'subscript', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '99', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'cloud'}; {'id': '101', 'type': 'attribute', 'children': ['102', '105']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '104', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'zone'}; {'id': '106', 'type': 'call', 'children': ['107', '114']}; {'id': '107', 'type': 'attribute', 'children': ['108', '113']}; {'id': '108', 'type': 'attribute', 'children': ['109', '112']}; {'id': '109', 'type': 'subscript', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '111', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '114', 'type': 'argument_list', 'children': []}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '118', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'node_dict'}; {'id': '122', 'type': 'dictionary', 'children': []}; {'id': '123', 'type': 'for_statement', 'children': ['124', '127', '132']}; {'id': '124', 'type': 'pattern_list', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'srt_dict'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '131', 'type': 'argument_list', 'children': []}; {'id': '132', 'type': 'block', 'children': ['133', '139']}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '138']}; {'id': '135', 'type': 'subscript', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'node_dict'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '139', 'type': 'expression_statement', 'children': ['140']}; {'id': '140', 'type': 'augmented_assignment', 'children': ['141', '142'], 'value': '+='}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '142', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '143', 'type': 'return_statement', 'children': ['144']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'node_dict'} | Convert node data from nested-list to sorted dict. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_sort_limit'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '20', '30']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '8', 'type': 'call', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'convert'}; {'id': '12', 'type': 'argument_list', 'children': ['13', '17']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"sort_limit"'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'to_int'}; {'id': '20', 'type': 'if_statement', 'children': ['21', '25']}; {'id': '21', 'type': '()', 'children': ['22']}; {'id': '22', 'type': 'comparison_operator', 'children': ['23', '24'], 'value': '<'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '24', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'limit'}; {'id': '29', 'type': 'None', 'children': []}; {'id': '30', 'type': 'return_statement', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'limit'} | returns the 'sort_limit' from the request |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_sort_on'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'default_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'allowed_indexes'}; {'id': '6', 'type': 'None', 'children': []}; {'id': '7', 'type': 'block', 'children': ['8', '15', '36']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'sort_on'}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'string', 'children': [], 'value': '"sort_on"'}; {'id': '15', 'type': 'if_statement', 'children': ['16', '21']}; {'id': '16', 'type': 'boolean_operator', 'children': ['17', '18'], 'value': 'and'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'allowed_indexes'}; {'id': '18', 'type': 'comparison_operator', 'children': ['19', '20'], 'value': 'not'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'sort_on'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'allowed_indexes'}; {'id': '21', 'type': 'block', 'children': ['22', '34']}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'warn'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'string', 'children': [], 'value': '"Index \'{}\' is not in allowed_indexes"'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'sort_on'}; {'id': '34', 'type': 'return_statement', 'children': ['35']}; {'id': '35', 'type': 'None', 'children': []}; {'id': '36', 'type': 'return_statement', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'sort_on'} | returns the 'sort_on' from the request |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_dict'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '7', 'type': 'block', 'children': ['8', '10']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'string', 'children': [], 'value': "'''Sort a list of dictionaries by dictionary key'''"}; {'id': '10', 'type': 'return_statement', 'children': ['11']}; {'id': '11', 'type': 'conditional_expression', 'children': ['12', '22', '23'], 'value': 'if'}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '14', 'type': 'argument_list', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '16', 'type': 'keyword_argument', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'itemgetter'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '23', 'type': 'list', 'children': [], 'value': '[]'} | Sort a list of dictionaries by dictionary key |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__draw_cmp'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '16', '19', '31']}; {'id': '9', 'type': 'comparison_operator', 'children': ['10', '13'], 'value': '>'}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'draw_order'}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'draw_order'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '19', 'type': 'elif_clause', 'children': ['20', '27']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '24'], 'value': '<'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'draw_order'}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'draw_order'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'return_statement', 'children': ['29']}; {'id': '29', 'type': 'unary_operator', 'children': ['30'], 'value': '-'}; {'id': '30', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '31', 'type': 'else_clause', 'children': ['32']}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'return_statement', 'children': ['34']}; {'id': '34', 'type': 'integer', 'children': [], 'value': '0'} | Defines how our drawable objects should be sorted |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__up_cmp'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '16', '19', '31']}; {'id': '9', 'type': 'comparison_operator', 'children': ['10', '13'], 'value': '>'}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'update_order'}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'update_order'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '19', 'type': 'elif_clause', 'children': ['20', '27']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '24'], 'value': '<'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'obj1'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'update_order'}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'obj2'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'update_order'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'return_statement', 'children': ['29']}; {'id': '29', 'type': 'unary_operator', 'children': ['30'], 'value': '-'}; {'id': '30', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '31', 'type': 'else_clause', 'children': ['32']}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'return_statement', 'children': ['34']}; {'id': '34', 'type': 'integer', 'children': [], 'value': '0'} | Defines how our updatable objects should be sorted |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_sort'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'dictionary_splat_pattern', 'children': ['6']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '7', 'type': 'block', 'children': ['8', '10', '14', '24', '75']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'string', 'children': [], 'value': "''' Break url parameters and turn into sort arguments '''"}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '13', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '21', 'type': 'argument_list', 'children': ['22', '23']}; {'id': '22', 'type': 'string', 'children': [], 'value': "'order_by'"}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'if_statement', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '26', 'type': 'block', 'children': ['27', '41']}; {'id': '27', 'type': 'if_statement', 'children': ['28', '34']}; {'id': '28', 'type': 'comparison_operator', 'children': ['29', '33'], 'value': 'is'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '38', 'type': 'subscript', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '40', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '41', 'type': 'if_statement', 'children': ['42', '49', '64']}; {'id': '42', 'type': 'comparison_operator', 'children': ['43', '48'], 'value': '=='}; {'id': '43', 'type': 'subscript', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '45', 'type': 'slice', 'children': ['46', '47']}; {'id': '46', 'type': 'colon', 'children': []}; {'id': '47', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '48', 'type': 'string', 'children': [], 'value': "'-'"}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'tuple', 'children': ['57', '62']}; {'id': '57', 'type': 'subscript', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '59', 'type': 'slice', 'children': ['60', '61']}; {'id': '60', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '61', 'type': 'colon', 'children': []}; {'id': '62', 'type': 'unary_operator', 'children': ['63'], 'value': '-'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '64', 'type': 'else_clause', 'children': ['65']}; {'id': '65', 'type': 'block', 'children': ['66']}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '71', 'type': 'argument_list', 'children': ['72']}; {'id': '72', 'type': 'tuple', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'order'}; {'id': '74', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '75', 'type': 'return_statement', 'children': ['76']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'sort'} | Break url parameters and turn into sort arguments |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_transform_chrom'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'try_statement', 'children': ['7', '15', '39']}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '15', 'type': 'except_clause', 'children': ['16']}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'if_statement', 'children': ['18', '23', '26', '33']}; {'id': '18', 'type': 'comparison_operator', 'children': ['19', '20'], 'value': 'in'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '20', 'type': 'list', 'children': ['21', '22'], 'value': "['X', 'Y']"}; {'id': '21', 'type': 'string', 'children': [], 'value': "'X'"}; {'id': '22', 'type': 'string', 'children': [], 'value': "'Y'"}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '26', 'type': 'elif_clause', 'children': ['27', '30']}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '29'], 'value': '=='}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '29', 'type': 'string', 'children': [], 'value': "'MT'"}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'return_statement', 'children': ['32']}; {'id': '32', 'type': 'string', 'children': [], 'value': "'_MT'"}; {'id': '33', 'type': 'else_clause', 'children': ['34']}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'return_statement', 'children': ['36']}; {'id': '36', 'type': 'binary_operator', 'children': ['37', '38'], 'value': '+'}; {'id': '37', 'type': 'string', 'children': [], 'value': "'__'"}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'chrom'}; {'id': '39', 'type': 'else_clause', 'children': ['40']}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'return_statement', 'children': ['42']}; {'id': '42', 'type': 'binary_operator', 'children': ['43', '44'], 'value': '%'}; {'id': '43', 'type': 'string', 'children': [], 'value': "'%02d'"}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'c'} | Helper function to obtain specific sort order. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_show'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '23']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': '_runshell'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '18']}; {'id': '12', 'type': 'list', 'children': ['13', '14', '15'], 'value': "[brctlexe, 'show', self.name]"}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'brctlexe'}; {'id': '14', 'type': 'string', 'children': [], 'value': "'show'"}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '18', 'type': 'binary_operator', 'children': ['19', '20'], 'value': '%'}; {'id': '19', 'type': 'string', 'children': [], 'value': '"Could not show %s."'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '23', 'type': 'return_statement', 'children': ['24']}; {'id': '24', 'type': 'subscript', 'children': ['25', '36']}; {'id': '25', 'type': 'call', 'children': ['26', '35']}; {'id': '26', 'type': 'attribute', 'children': ['27', '34']}; {'id': '27', 'type': 'call', 'children': ['28', '33']}; {'id': '28', 'type': 'attribute', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'stdout'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'read'}; {'id': '33', 'type': 'argument_list', 'children': []}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '35', 'type': 'argument_list', 'children': []}; {'id': '36', 'type': 'slice', 'children': ['37', '38']}; {'id': '37', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '38', 'type': 'colon', 'children': []} | Return a list of unsorted bridge details. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'resort'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'attributeID'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10', '21', '29', '46', '83', '89']}; {'id': '10', 'type': 'if_statement', 'children': ['11', '14']}; {'id': '11', 'type': 'comparison_operator', 'children': ['12', '13'], 'value': 'is'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '13', 'type': 'None', 'children': []}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'defaultSortAscending'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'newSortColumn'}; {'id': '24', 'type': 'subscript', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'attributeID'}; {'id': '29', 'type': 'if_statement', 'children': ['30', '37']}; {'id': '30', 'type': 'comparison_operator', 'children': ['31', '36'], 'value': 'is'}; {'id': '31', 'type': 'call', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'newSortColumn'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'sortAttribute'}; {'id': '35', 'type': 'argument_list', 'children': []}; {'id': '36', 'type': 'None', 'children': []}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'raise_statement', 'children': ['39']}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'Unsortable'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'binary_operator', 'children': ['43', '44'], 'value': '%'}; {'id': '43', 'type': 'string', 'children': [], 'value': "'column %r has no sort attribute'"}; {'id': '44', 'type': 'tuple', 'children': ['45']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'attributeID'}; {'id': '46', 'type': 'if_statement', 'children': ['47', '52', '71']}; {'id': '47', 'type': 'comparison_operator', 'children': ['48', '51'], 'value': '=='}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'currentSortColumn'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'newSortColumn'}; {'id': '52', 'type': 'block', 'children': ['53']}; {'id': '53', 'type': 'if_statement', 'children': ['54', '59', '64']}; {'id': '54', 'type': 'comparison_operator', 'children': ['55', '58'], 'value': '=='}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '64', 'type': 'else_clause', 'children': ['65']}; {'id': '65', 'type': 'block', 'children': ['66']}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'assignment', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '69', 'type': 'unary_operator', 'children': ['70'], 'value': '-'}; {'id': '70', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '71', 'type': 'else_clause', 'children': ['72']}; {'id': '72', 'type': 'block', 'children': ['73', '77']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '76', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'currentSortColumn'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'newSortColumn'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'isAscending'}; {'id': '89', 'type': 'expression_statement', 'children': ['90']}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': '_updateResults'}; {'id': '94', 'type': 'argument_list', 'children': ['95', '101']}; {'id': '95', 'type': 'call', 'children': ['96', '99']}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': '_sortAttributeValue'}; {'id': '99', 'type': 'argument_list', 'children': ['100']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'offset'}; {'id': '101', 'type': 'True', 'children': []} | Sort by one of my specified columns, identified by attributeID |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_dict_values_sorted_by_key'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'dictionary'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '10', '26']}; {'id': '7', 'type': 'pattern_list', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '12', 'type': 'argument_list', 'children': ['13', '18']}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'dictionary'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'iteritems'}; {'id': '17', 'type': 'argument_list', 'children': []}; {'id': '18', 'type': 'keyword_argument', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'operator'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'itemgetter'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'yield', 'children': ['29']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'value'} | Internal helper to return the values of a dictionary, sorted by key. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '52']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'uclust_cluster_from_sorted_fasta_filepath'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17', '20', '23', '26', '29', '32', '35', '38', '41', '44', '49']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'fasta_filepath'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'uc_save_filepath'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'percent_ID'}; {'id': '10', 'type': 'float', 'children': [], 'value': '0.97'}; {'id': '11', 'type': 'default_parameter', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'max_accepts'}; {'id': '13', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '14', 'type': 'default_parameter', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'max_rejects'}; {'id': '16', 'type': 'integer', 'children': [], 'value': '8'}; {'id': '17', 'type': 'default_parameter', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'stepwords'}; {'id': '19', 'type': 'integer', 'children': [], 'value': '8'}; {'id': '20', 'type': 'default_parameter', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'word_length'}; {'id': '22', 'type': 'integer', 'children': [], 'value': '8'}; {'id': '23', 'type': 'default_parameter', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'optimal'}; {'id': '25', 'type': 'False', 'children': []}; {'id': '26', 'type': 'default_parameter', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'exact'}; {'id': '28', 'type': 'False', 'children': []}; {'id': '29', 'type': 'default_parameter', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'suppress_sort'}; {'id': '31', 'type': 'False', 'children': []}; {'id': '32', 'type': 'default_parameter', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'enable_rev_strand_matching'}; {'id': '34', 'type': 'False', 'children': []}; {'id': '35', 'type': 'default_parameter', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'subject_fasta_filepath'}; {'id': '37', 'type': 'None', 'children': []}; {'id': '38', 'type': 'default_parameter', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'suppress_new_clusters'}; {'id': '40', 'type': 'False', 'children': []}; {'id': '41', 'type': 'default_parameter', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'stable_sort'}; {'id': '43', 'type': 'False', 'children': []}; {'id': '44', 'type': 'default_parameter', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'tmp_dir'}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'gettempdir'}; {'id': '48', 'type': 'argument_list', 'children': []}; {'id': '49', 'type': 'default_parameter', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'HALT_EXEC'}; {'id': '51', 'type': 'False', 'children': []}; {'id': '52', 'type': 'block', 'children': ['53', '57', '78', '100', '113', '126', '139', '152', '165', '179', '192', '205', '218']}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'output_filepath'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'uc_save_filepath'}; {'id': '57', 'type': 'if_statement', 'children': ['58', '60']}; {'id': '58', 'type': 'not_operator', 'children': ['59']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'output_filepath'}; {'id': '60', 'type': 'block', 'children': ['61']}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '66']}; {'id': '63', 'type': 'pattern_list', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'output_filepath'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'mkstemp'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '72', '75']}; {'id': '69', 'type': 'keyword_argument', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'dir'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'tmp_dir'}; {'id': '72', 'type': 'keyword_argument', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'uclust_clusters'"}; {'id': '75', 'type': 'keyword_argument', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'suffix'}; {'id': '77', 'type': 'string', 'children': [], 'value': "'.uc'"}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '81', 'type': 'dictionary', 'children': ['82', '85', '88', '91', '94', '97']}; {'id': '82', 'type': 'pair', 'children': ['83', '84']}; {'id': '83', 'type': 'string', 'children': [], 'value': "'--id'"}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'percent_ID'}; {'id': '85', 'type': 'pair', 'children': ['86', '87']}; {'id': '86', 'type': 'string', 'children': [], 'value': "'--maxaccepts'"}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'max_accepts'}; {'id': '88', 'type': 'pair', 'children': ['89', '90']}; {'id': '89', 'type': 'string', 'children': [], 'value': "'--maxrejects'"}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'max_rejects'}; {'id': '91', 'type': 'pair', 'children': ['92', '93']}; {'id': '92', 'type': 'string', 'children': [], 'value': "'--stepwords'"}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'stepwords'}; {'id': '94', 'type': 'pair', 'children': ['95', '96']}; {'id': '95', 'type': 'string', 'children': [], 'value': "'--w'"}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'word_length'}; {'id': '97', 'type': 'pair', 'children': ['98', '99']}; {'id': '98', 'type': 'string', 'children': [], 'value': "'--tmpdir'"}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'tmp_dir'}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '103', 'type': 'call', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'Uclust'}; {'id': '105', 'type': 'argument_list', 'children': ['106', '107', '110']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '107', 'type': 'keyword_argument', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'TmpDir'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'tmp_dir'}; {'id': '110', 'type': 'keyword_argument', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'HALT_EXEC'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'HALT_EXEC'}; {'id': '113', 'type': 'if_statement', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'enable_rev_strand_matching'}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '125']}; {'id': '118', 'type': 'attribute', 'children': ['119', '124']}; {'id': '119', 'type': 'subscript', 'children': ['120', '123']}; {'id': '120', 'type': 'attribute', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '123', 'type': 'string', 'children': [], 'value': "'--rev'"}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '125', 'type': 'argument_list', 'children': []}; {'id': '126', 'type': 'if_statement', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'optimal'}; {'id': '128', 'type': 'block', 'children': ['129']}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'call', 'children': ['131', '138']}; {'id': '131', 'type': 'attribute', 'children': ['132', '137']}; {'id': '132', 'type': 'subscript', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '136', 'type': 'string', 'children': [], 'value': "'--optimal'"}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '138', 'type': 'argument_list', 'children': []}; {'id': '139', 'type': 'if_statement', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'exact'}; {'id': '141', 'type': 'block', 'children': ['142']}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'call', 'children': ['144', '151']}; {'id': '144', 'type': 'attribute', 'children': ['145', '150']}; {'id': '145', 'type': 'subscript', 'children': ['146', '149']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '149', 'type': 'string', 'children': [], 'value': "'--exact'"}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '151', 'type': 'argument_list', 'children': []}; {'id': '152', 'type': 'if_statement', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'suppress_sort'}; {'id': '154', 'type': 'block', 'children': ['155']}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '164']}; {'id': '157', 'type': 'attribute', 'children': ['158', '163']}; {'id': '158', 'type': 'subscript', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '162', 'type': 'string', 'children': [], 'value': "'--usersort'"}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '164', 'type': 'argument_list', 'children': []}; {'id': '165', 'type': 'if_statement', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'subject_fasta_filepath'}; {'id': '167', 'type': 'block', 'children': ['168']}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'call', 'children': ['170', '177']}; {'id': '170', 'type': 'attribute', 'children': ['171', '176']}; {'id': '171', 'type': 'subscript', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'--lib'"}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '177', 'type': 'argument_list', 'children': ['178']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'subject_fasta_filepath'}; {'id': '179', 'type': 'if_statement', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'suppress_new_clusters'}; {'id': '181', 'type': 'block', 'children': ['182']}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'call', 'children': ['184', '191']}; {'id': '184', 'type': 'attribute', 'children': ['185', '190']}; {'id': '185', 'type': 'subscript', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '189', 'type': 'string', 'children': [], 'value': "'--libonly'"}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '191', 'type': 'argument_list', 'children': []}; {'id': '192', 'type': 'if_statement', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'stable_sort'}; {'id': '194', 'type': 'block', 'children': ['195']}; {'id': '195', 'type': 'expression_statement', 'children': ['196']}; {'id': '196', 'type': 'call', 'children': ['197', '204']}; {'id': '197', 'type': 'attribute', 'children': ['198', '203']}; {'id': '198', 'type': 'subscript', 'children': ['199', '202']}; {'id': '199', 'type': 'attribute', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'Parameters'}; {'id': '202', 'type': 'string', 'children': [], 'value': "'--stable_sort'"}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'on'}; {'id': '204', 'type': 'argument_list', 'children': []}; {'id': '205', 'type': 'expression_statement', 'children': ['206']}; {'id': '206', 'type': 'assignment', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'app_result'}; {'id': '208', 'type': 'call', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'app'}; {'id': '210', 'type': 'argument_list', 'children': ['211']}; {'id': '211', 'type': 'dictionary', 'children': ['212', '215']}; {'id': '212', 'type': 'pair', 'children': ['213', '214']}; {'id': '213', 'type': 'string', 'children': [], 'value': "'--input'"}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'fasta_filepath'}; {'id': '215', 'type': 'pair', 'children': ['216', '217']}; {'id': '216', 'type': 'string', 'children': [], 'value': "'--uc'"}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'output_filepath'}; {'id': '218', 'type': 'return_statement', 'children': ['219']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'app_result'} | Returns clustered uclust file from sorted fasta |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sortObjects'}; {'id': '3', 'type': 'parameters', 'children': ['4', '7']}; {'id': '4', 'type': 'default_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'orderby'}; {'id': '6', 'type': 'string', 'children': [], 'value': "'created'"}; {'id': '7', 'type': 'dictionary_splat_pattern', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '9', 'type': 'block', 'children': ['10', '14', '36', '46', '55', '83']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '13', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '14', 'type': 'for_statement', 'children': ['15', '16', '21']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '20', 'type': 'argument_list', 'children': []}; {'id': '21', 'type': 'block', 'children': ['22']}; {'id': '22', 'type': 'for_statement', 'children': ['23', '24', '28']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'iter'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '28', 'type': 'block', 'children': ['29']}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'call', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '44', 'type': 'argument_list', 'children': ['45']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'sortfunc'}; {'id': '49', 'type': 'conditional_expression', 'children': ['50', '51', '54'], 'value': 'if'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': '_sortByCreated'}; {'id': '51', 'type': 'comparison_operator', 'children': ['52', '53'], 'value': '=='}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'orderby'}; {'id': '53', 'type': 'string', 'children': [], 'value': "'created'"}; {'id': '54', 'type': 'identifier', 'children': [], 'value': '_sortByModified'}; {'id': '55', 'type': 'if_statement', 'children': ['56', '59', '67']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'PY2'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'call', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'sortfunc'}; {'id': '67', 'type': 'else_clause', 'children': ['68']}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'call', 'children': ['71', '74']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'keyword_argument', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '77', 'type': 'call', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'functools'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'cmp_to_key'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'sortfunc'}; {'id': '83', 'type': 'return_statement', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'o'} | Sorts lists of objects and combines them into a single list |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sortByCreated'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '15', '18', '30']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '12'], 'value': '<'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'created'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'created'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'return_statement', 'children': ['17']}; {'id': '17', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '18', 'type': 'elif_clause', 'children': ['19', '26']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '23'], 'value': '>'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'created'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'created'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'return_statement', 'children': ['28']}; {'id': '28', 'type': 'unary_operator', 'children': ['29'], 'value': '-'}; {'id': '29', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '30', 'type': 'else_clause', 'children': ['31']}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'return_statement', 'children': ['33']}; {'id': '33', 'type': 'integer', 'children': [], 'value': '0'} | Sort function for object by created date |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_sortByModified'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '15', '18', '30']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '12'], 'value': '<'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'return_statement', 'children': ['17']}; {'id': '17', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '18', 'type': 'elif_clause', 'children': ['19', '26']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '23'], 'value': '>'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'return_statement', 'children': ['28']}; {'id': '28', 'type': 'unary_operator', 'children': ['29'], 'value': '-'}; {'id': '29', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '30', 'type': 'else_clause', 'children': ['31']}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'return_statement', 'children': ['33']}; {'id': '33', 'type': 'integer', 'children': [], 'value': '0'} | Sort function for object by modified date |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_top'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'stat'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'return_statement', 'children': ['9']}; {'id': '9', 'type': 'subscript', 'children': ['10', '29']}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '12', 'type': 'argument_list', 'children': ['13', '16', '26']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'stats'}; {'id': '16', 'type': 'keyword_argument', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '18', 'type': 'lambda', 'children': ['19', '21']}; {'id': '19', 'type': 'lambda_parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '23', 'type': 'argument_list', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'stat'}; {'id': '26', 'type': 'keyword_argument', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '28', 'type': 'True', 'children': []}; {'id': '29', 'type': 'slice', 'children': ['30', '31']}; {'id': '30', 'type': 'colon', 'children': []}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'n'} | Return the top n values when sorting by 'stat |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_parents'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '14', '28', '49']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'distributions'}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'get_installed_distributions'}; {'id': '10', 'type': 'argument_list', 'children': ['11']}; {'id': '11', 'type': 'keyword_argument', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'user_only'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'ENABLE_USER_SITE'}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'remaining'}; {'id': '17', 'type': 'set_comprehension', 'children': ['18', '25']}; {'id': '18', 'type': 'call', 'children': ['19', '24']}; {'id': '19', 'type': 'attribute', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'project_name'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '24', 'type': 'argument_list', 'children': []}; {'id': '25', 'type': 'for_in_clause', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'distributions'}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'requirements'}; {'id': '31', 'type': 'set_comprehension', 'children': ['32', '39', '42']}; {'id': '32', 'type': 'call', 'children': ['33', '38']}; {'id': '33', 'type': 'attribute', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'project_name'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '38', 'type': 'argument_list', 'children': []}; {'id': '39', 'type': 'for_in_clause', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'distributions'}; {'id': '42', 'type': 'for_in_clause', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '44', 'type': 'call', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'requires'}; {'id': '48', 'type': 'argument_list', 'children': []}; {'id': '49', 'type': 'return_statement', 'children': ['50']}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'get_realnames'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'binary_operator', 'children': ['54', '55'], 'value': '-'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'remaining'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'requirements'} | Return sorted list of names of packages without dependants. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_sort'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '7', '18', '30', '43']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'string', 'children': [], 'value': "'''Build sort query paramter from kwargs'''"}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '10', 'type': 'call', 'children': ['11', '16']}; {'id': '11', 'type': 'attribute', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'getlist'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'string', 'children': [], 'value': "'sort'"}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '21', 'type': 'conditional_expression', 'children': ['22', '24', '29'], 'value': 'if'}; {'id': '22', 'type': 'list', 'children': ['23'], 'value': '[sorts]'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'basestring'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '33', 'type': 'list_comprehension', 'children': ['34', '40']}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '40', 'type': 'for_in_clause', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '43', 'type': 'return_statement', 'children': ['44']}; {'id': '44', 'type': 'list_comprehension', 'children': ['45', '51', '56']}; {'id': '45', 'type': 'dictionary', 'children': ['46']}; {'id': '46', 'type': 'pair', 'children': ['47', '50']}; {'id': '47', 'type': 'subscript', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'SORTS'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '51', 'type': 'for_in_clause', 'children': ['52', '55']}; {'id': '52', 'type': 'pattern_list', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'sorts'}; {'id': '56', 'type': 'if_clause', 'children': ['57']}; {'id': '57', 'type': 'comparison_operator', 'children': ['58', '59'], 'value': 'in'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'SORTS'} | Build sort query paramter from kwargs |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'transactions'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'subscript', 'children': ['8', '34']}; {'id': '8', 'type': 'call', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'transactions'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'keyword_argument', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '15', 'type': 'lambda', 'children': ['16', '18']}; {'id': '16', 'type': 'lambda_parameters', 'children': ['17']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '18', 'type': 'call', 'children': ['19', '24']}; {'id': '19', 'type': 'attribute', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '33']}; {'id': '25', 'type': 'subscript', 'children': ['26', '32']}; {'id': '26', 'type': 'call', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'string', 'children': [], 'value': "':'"}; {'id': '32', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '33', 'type': 'string', 'children': [], 'value': "'%Y-%m-%d'"}; {'id': '34', 'type': 'slice', 'children': ['35']}; {'id': '35', 'type': 'colon', 'children': []} | Return a list of sorted transactions by date. |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'reconstruct_files'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '5', 'type': 'block', 'children': ['6', '8', '17']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'string', 'children': [], 'value': "'''sorts ``input_dir`` and tries to reconstruct the subdirectories found'''"}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '17', 'type': 'with_statement', 'children': ['18', '26']}; {'id': '18', 'type': 'with_clause', 'children': ['19']}; {'id': '19', 'type': 'with_item', 'children': ['20']}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'notify'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'string', 'children': [], 'value': "'Attempting to organize/reconstruct directory'"}; {'id': '26', 'type': 'block', 'children': ['27', '76', '85', '91']}; {'id': '27', 'type': 'for_statement', 'children': ['28', '32', '38']}; {'id': '28', 'type': 'pattern_list', 'children': ['29', '30', '31']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'ds'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'fs'}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'walk'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '38', 'type': 'block', 'children': ['39']}; {'id': '39', 'type': 'for_statement', 'children': ['40', '41', '42']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'fs'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'if_statement', 'children': ['44', '49']}; {'id': '44', 'type': 'comparison_operator', 'children': ['45', '48'], 'value': '=='}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '47', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '48', 'type': 'string', 'children': [], 'value': "'.'"}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'shutil'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'move'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '65']}; {'id': '56', 'type': 'call', 'children': ['57', '62']}; {'id': '57', 'type': 'attribute', 'children': ['58', '61']}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '62', 'type': 'argument_list', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '65', 'type': 'call', 'children': ['66', '71']}; {'id': '66', 'type': 'attribute', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '71', 'type': 'argument_list', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '73', 'type': 'binary_operator', 'children': ['74', '75'], 'value': '+'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'i'"}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '83']}; {'id': '78', 'type': 'attribute', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'dicom'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'organize_dir'}; {'id': '83', 'type': 'argument_list', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'output_dir'}; {'id': '88', 'type': 'binary_operator', 'children': ['89', '90'], 'value': '%'}; {'id': '89', 'type': 'string', 'children': [], 'value': "'%s-sorted'"}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '91', 'type': 'if_statement', 'children': ['92', '100', '141']}; {'id': '92', 'type': 'call', 'children': ['93', '98']}; {'id': '93', 'type': 'attribute', 'children': ['94', '97']}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'exists'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'output_dir'}; {'id': '100', 'type': 'block', 'children': ['101']}; {'id': '101', 'type': 'with_statement', 'children': ['102', '110']}; {'id': '102', 'type': 'with_clause', 'children': ['103']}; {'id': '103', 'type': 'with_item', 'children': ['104']}; {'id': '104', 'type': 'call', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'run_in'}; {'id': '108', 'type': 'argument_list', 'children': ['109']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'output_dir'}; {'id': '110', 'type': 'block', 'children': ['111']}; {'id': '111', 'type': 'for_statement', 'children': ['112', '113', '119']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'dset_dir'}; {'id': '113', 'type': 'call', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'listdir'}; {'id': '117', 'type': 'argument_list', 'children': ['118']}; {'id': '118', 'type': 'string', 'children': [], 'value': "'.'"}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'with_statement', 'children': ['121', '131']}; {'id': '121', 'type': 'with_clause', 'children': ['122']}; {'id': '122', 'type': 'with_item', 'children': ['123']}; {'id': '123', 'type': 'call', 'children': ['124', '127']}; {'id': '124', 'type': 'attribute', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'notify'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'binary_operator', 'children': ['129', '130'], 'value': '%'}; {'id': '129', 'type': 'string', 'children': [], 'value': "'creating dataset from %s'"}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'dset_dir'}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'call', 'children': ['134', '139']}; {'id': '134', 'type': 'attribute', 'children': ['135', '138']}; {'id': '135', 'type': 'attribute', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'dicom'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'create_dset'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'dset_dir'}; {'id': '141', 'type': 'else_clause', 'children': ['142']}; {'id': '142', 'type': 'block', 'children': ['143']}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'notify'}; {'id': '148', 'type': 'argument_list', 'children': ['149', '152']}; {'id': '149', 'type': 'binary_operator', 'children': ['150', '151'], 'value': '%'}; {'id': '150', 'type': 'string', 'children': [], 'value': "'Warning: failed to auto-organize directory %s'"}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '152', 'type': 'keyword_argument', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '154', 'type': 'attribute', 'children': ['155', '158']}; {'id': '155', 'type': 'attribute', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'nl'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'warning'} | sorts ``input_dir`` and tries to reconstruct the subdirectories found |
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_create_output_from_match'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'match_result'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '22']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'full_path'}; {'id': '10', 'type': 'subscript', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'match_result'}; {'id': '12', 'type': 'string', 'children': [], 'value': "'full_path'"}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': '_get_relative_path'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'full_path'}; {'id': '22', 'type': 'return_statement', 'children': ['23']}; {'id': '23', 'type': 'call', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'LinterOutput'}; {'id': '25', 'type': 'argument_list', 'children': ['26', '29', '30']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '30', 'type': 'subscript', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'match_result'}; {'id': '32', 'type': 'string', 'children': [], 'value': "'msg'"} | As isort outputs full path, we change it to relative path. |
Subsets and Splits