sequence
stringlengths
1.37k
35.1k
docstring
stringlengths
17
102
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'bin_atoms'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '8', '26', '44', '60', '90', '94', '162', '231', '299', '303', '359']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'string', 'children': [], 'value': "'''This function bins the Atoms into fixed-size sections of the protein space in 3D.'''"}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'low_point'}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'list', 'children': ['17', '20', '23'], 'value': '[self.min_x, self.min_y, self.min_z]'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'min_x'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'min_y'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'min_z'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'high_point'}; {'id': '29', 'type': 'call', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'list', 'children': ['35', '38', '41'], 'value': '[self.max_x, self.max_y, self.max_z]'}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'max_x'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'max_y'}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'max_z'}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'ceil'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'binary_operator', 'children': ['53', '57'], 'value': '/'}; {'id': '53', 'type': '()', 'children': ['54']}; {'id': '54', 'type': 'binary_operator', 'children': ['55', '56'], 'value': '-'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'high_point'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'low_point'}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'bin_size'}; {'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': 'self'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '65', 'type': 'tuple', 'children': ['66', '74', '82']}; {'id': '66', 'type': 'binary_operator', 'children': ['67', '73'], 'value': '-'}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '72', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '73', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '74', 'type': 'binary_operator', 'children': ['75', '81'], 'value': '-'}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'subscript', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '80', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '81', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '82', 'type': 'binary_operator', 'children': ['83', '89'], 'value': '-'}; {'id': '83', 'type': 'call', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'subscript', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '88', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '89', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'assignment', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '93', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '94', 'type': 'for_statement', 'children': ['95', '96', '105']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'call', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '104', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '105', 'type': 'block', 'children': ['106', '113']}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '113', 'type': 'for_statement', 'children': ['114', '115', '124']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '115', 'type': 'call', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '117', 'type': 'argument_list', 'children': ['118']}; {'id': '118', 'type': 'call', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '120', 'type': 'argument_list', 'children': ['121']}; {'id': '121', 'type': 'subscript', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '123', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '124', 'type': 'block', 'children': ['125', '134']}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'call', 'children': ['127', '132']}; {'id': '127', 'type': 'attribute', 'children': ['128', '131']}; {'id': '128', 'type': 'subscript', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '132', 'type': 'argument_list', 'children': ['133']}; {'id': '133', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '134', 'type': 'for_statement', 'children': ['135', '136', '145']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '136', 'type': 'call', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '138', 'type': 'argument_list', 'children': ['139']}; {'id': '139', 'type': 'call', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '141', 'type': 'argument_list', 'children': ['142']}; {'id': '142', 'type': 'subscript', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '144', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '155']}; {'id': '148', 'type': 'attribute', 'children': ['149', '154']}; {'id': '149', 'type': 'subscript', 'children': ['150', '153']}; {'id': '150', 'type': 'subscript', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'Bin'}; {'id': '158', 'type': 'argument_list', 'children': ['159', '160', '161']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '162', 'type': 'for_statement', 'children': ['163', '166', '173']}; {'id': '163', 'type': 'pattern_list', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'serial_number'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'atom'}; {'id': '166', 'type': 'call', 'children': ['167', '172']}; {'id': '167', 'type': 'attribute', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'atoms'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'iteritems'}; {'id': '172', 'type': 'argument_list', 'children': []}; {'id': '173', 'type': 'block', 'children': ['174', '192', '217', '224']}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'assignment', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'bin_location'}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'trunc'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'binary_operator', 'children': ['183', '189'], 'value': '/'}; {'id': '183', 'type': '()', 'children': ['184']}; {'id': '184', 'type': 'binary_operator', 'children': ['185', '188'], 'value': '-'}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'atom'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'point'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'low_point'}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'bin_size'}; {'id': '192', 'type': 'expression_statement', 'children': ['193']}; {'id': '193', 'type': 'assignment', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'bin'}; {'id': '195', 'type': 'subscript', 'children': ['196', '211']}; {'id': '196', 'type': 'subscript', 'children': ['197', '205']}; {'id': '197', 'type': 'subscript', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '199', 'type': 'call', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '201', 'type': 'argument_list', 'children': ['202']}; {'id': '202', 'type': 'subscript', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'bin_location'}; {'id': '204', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '205', 'type': 'call', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'subscript', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'bin_location'}; {'id': '210', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '213', 'type': 'argument_list', 'children': ['214']}; {'id': '214', 'type': 'subscript', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'bin_location'}; {'id': '216', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'call', 'children': ['219', '222']}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'bin'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '222', 'type': 'argument_list', 'children': ['223']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'atom'}; {'id': '224', 'type': 'expression_statement', 'children': ['225']}; {'id': '225', 'type': 'call', 'children': ['226', '229']}; {'id': '226', 'type': 'attribute', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'atom'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'set_bin'}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'bin'}; {'id': '231', 'type': 'if_statement', 'children': ['232', '235']}; {'id': '232', 'type': 'attribute', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'safe_mode'}; {'id': '235', 'type': 'block', 'children': ['236', '240', '289']}; {'id': '236', 'type': 'expression_statement', 'children': ['237']}; {'id': '237', 'type': 'assignment', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'num_atoms'}; {'id': '239', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '240', 'type': 'for_statement', 'children': ['241', '242', '251']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '242', 'type': 'call', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '244', 'type': 'argument_list', 'children': ['245']}; {'id': '245', 'type': 'call', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '247', 'type': 'argument_list', 'children': ['248']}; {'id': '248', 'type': 'subscript', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '250', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '251', 'type': 'block', 'children': ['252']}; {'id': '252', 'type': 'for_statement', 'children': ['253', '254', '263']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '254', 'type': 'call', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '256', 'type': 'argument_list', 'children': ['257']}; {'id': '257', 'type': 'call', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '259', 'type': 'argument_list', 'children': ['260']}; {'id': '260', 'type': 'subscript', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '262', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '263', 'type': 'block', 'children': ['264']}; {'id': '264', 'type': 'for_statement', 'children': ['265', '266', '275']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '266', 'type': 'call', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '268', 'type': 'argument_list', 'children': ['269']}; {'id': '269', 'type': 'call', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '271', 'type': 'argument_list', 'children': ['272']}; {'id': '272', 'type': 'subscript', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '274', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '275', 'type': 'block', 'children': ['276']}; {'id': '276', 'type': 'expression_statement', 'children': ['277']}; {'id': '277', 'type': 'augmented_assignment', 'children': ['278', '279'], 'value': '+='}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'num_atoms'}; {'id': '279', 'type': 'call', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '281', 'type': 'argument_list', 'children': ['282']}; {'id': '282', 'type': 'subscript', 'children': ['283', '288']}; {'id': '283', 'type': 'subscript', 'children': ['284', '287']}; {'id': '284', 'type': 'subscript', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '289', 'type': 'assert_statement', 'children': ['290']}; {'id': '290', 'type': '()', 'children': ['291']}; {'id': '291', 'type': 'comparison_operator', 'children': ['292', '293'], 'value': '=='}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'num_atoms'}; {'id': '293', 'type': 'call', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '295', 'type': 'argument_list', 'children': ['296']}; {'id': '296', 'type': 'attribute', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'atoms'}; {'id': '299', 'type': 'expression_statement', 'children': ['300']}; {'id': '300', 'type': 'assignment', 'children': ['301', '302']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'blank_section'}; {'id': '302', 'type': 'tuple', 'children': []}; {'id': '303', 'type': 'for_statement', 'children': ['304', '305', '314']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '305', 'type': 'call', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '307', 'type': 'argument_list', 'children': ['308']}; {'id': '308', 'type': 'call', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '310', 'type': 'argument_list', 'children': ['311']}; {'id': '311', 'type': 'subscript', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '313', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '314', 'type': 'block', 'children': ['315']}; {'id': '315', 'type': 'for_statement', 'children': ['316', '317', '326']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '317', 'type': 'call', 'children': ['318', '319']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '319', 'type': 'argument_list', 'children': ['320']}; {'id': '320', 'type': 'call', 'children': ['321', '322']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '322', 'type': 'argument_list', 'children': ['323']}; {'id': '323', 'type': 'subscript', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '325', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '326', 'type': 'block', 'children': ['327']}; {'id': '327', 'type': 'for_statement', 'children': ['328', '329', '338']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '329', 'type': 'call', 'children': ['330', '331']}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '331', 'type': 'argument_list', 'children': ['332']}; {'id': '332', 'type': 'call', 'children': ['333', '334']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '334', 'type': 'argument_list', 'children': ['335']}; {'id': '335', 'type': 'subscript', 'children': ['336', '337']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'atom_bin_dimensions'}; {'id': '337', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '338', 'type': 'block', 'children': ['339']}; {'id': '339', 'type': 'if_statement', 'children': ['340', '348']}; {'id': '340', 'type': 'not_operator', 'children': ['341']}; {'id': '341', 'type': 'subscript', 'children': ['342', '347']}; {'id': '342', 'type': 'subscript', 'children': ['343', '346']}; {'id': '343', 'type': 'subscript', 'children': ['344', '345']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '348', 'type': 'block', 'children': ['349']}; {'id': '349', 'type': 'expression_statement', 'children': ['350']}; {'id': '350', 'type': 'assignment', 'children': ['351', '358']}; {'id': '351', 'type': 'subscript', 'children': ['352', '357']}; {'id': '352', 'type': 'subscript', 'children': ['353', '356']}; {'id': '353', 'type': 'subscript', 'children': ['354', '355']}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'y'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'z'}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'blank_section'}; {'id': '359', 'type': 'expression_statement', 'children': ['360']}; {'id': '360', 'type': 'assignment', 'children': ['361', '364']}; {'id': '361', 'type': 'attribute', 'children': ['362', '363']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '363', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'atom_bins'}
This function bins the Atoms into fixed-size sections of the protein space in 3D.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'patterns'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '52', '58', '90', '101', '109', '125']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '20']}; {'id': '7', 'type': 'boolean_operator', 'children': ['8', '14'], 'value': 'and'}; {'id': '8', 'type': 'not_operator', 'children': ['9']}; {'id': '9', 'type': 'attribute', 'children': ['10', '13']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '14', 'type': 'not_operator', 'children': ['15']}; {'id': '15', 'type': 'attribute', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'pattern_files'}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'try_statement', 'children': ['22', '43']}; {'id': '22', 'type': 'block', 'children': ['23']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'call', 'children': ['25', '32']}; {'id': '25', 'type': 'attribute', 'children': ['26', '31']}; {'id': '26', 'type': 'attribute', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'call', 'children': ['34', '41']}; {'id': '34', 'type': 'attribute', 'children': ['35', '40']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '43', 'type': 'except_clause', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '45', 'type': 'block', 'children': ['46']}; {'id': '46', 'type': 'raise_statement', 'children': ['47']}; {'id': '47', 'type': 'call', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'LogRaptorArgumentError'}; {'id': '49', 'type': 'argument_list', 'children': ['50', '51']}; {'id': '50', 'type': 'string', 'children': [], 'value': "'PATTERN'"}; {'id': '51', 'type': 'string', 'children': [], 'value': "'no search pattern'"}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '55', 'type': 'call', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '57', 'type': 'argument_list', 'children': []}; {'id': '58', 'type': 'if_statement', 'children': ['59', '64']}; {'id': '59', 'type': 'attribute', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'pattern_files'}; {'id': '64', 'type': 'block', 'children': ['65']}; {'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': 'patterns'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'list_comprehension', 'children': ['72', '78']}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '78', 'type': 'for_in_clause', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '80', 'type': 'call', 'children': ['81', '84']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'fileinput'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'input'}; {'id': '84', 'type': 'argument_list', 'children': ['85']}; {'id': '85', 'type': 'attribute', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'pattern_files'}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'attribute', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'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': 'logger'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '106', 'type': 'argument_list', 'children': ['107', '108']}; {'id': '107', 'type': 'string', 'children': [], 'value': '"search patterns to be processed: %r"'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '109', 'type': 'if_statement', 'children': ['110', '113']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112'], 'value': 'in'}; {'id': '111', 'type': 'string', 'children': [], 'value': "''"}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '113', 'type': 'block', 'children': ['114', '121']}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'string', 'children': [], 'value': '"an empty pattern provided: match all strings!"'}; {'id': '121', 'type': 'return_statement', 'children': ['122']}; {'id': '122', 'type': 'call', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '124', 'type': 'argument_list', 'children': []}; {'id': '125', 'type': 'try_statement', 'children': ['126', '174']}; {'id': '126', 'type': 'block', 'children': ['127', '144']}; {'id': '127', 'type': 'expression_statement', 'children': ['128']}; {'id': '128', 'type': 'assignment', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '130', 'type': 'conditional_expression', 'children': ['131', '134', '139'], 'value': 'if'}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'IGNORECASE'}; {'id': '134', 'type': 'attribute', 'children': ['135', '138']}; {'id': '135', 'type': 'attribute', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'case'}; {'id': '139', 'type': 'binary_operator', 'children': ['140', '141'], 'value': '|'}; {'id': '140', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'UNICODE'}; {'id': '144', 'type': 'return_statement', 'children': ['145']}; {'id': '145', 'type': 'call', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '147', 'type': 'argument_list', 'children': ['148']}; {'id': '148', 'type': 'list_comprehension', 'children': ['149', '169', '172']}; {'id': '149', 'type': 'call', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'compile'}; {'id': '153', 'type': 'argument_list', 'children': ['154', '166']}; {'id': '154', 'type': 'conditional_expression', 'children': ['155', '158', '163'], 'value': 'if'}; {'id': '155', 'type': 'binary_operator', 'children': ['156', '157'], 'value': '%'}; {'id': '156', 'type': 'string', 'children': [], 'value': "r'(\\b%s\\b)'"}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'pat'}; {'id': '158', 'type': 'attribute', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'word'}; {'id': '163', 'type': 'binary_operator', 'children': ['164', '165'], 'value': '%'}; {'id': '164', 'type': 'string', 'children': [], 'value': "'(%s)'"}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'pat'}; {'id': '166', 'type': 'keyword_argument', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'flags'}; {'id': '169', 'type': 'for_in_clause', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'pat'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'patterns'}; {'id': '172', 'type': 'if_clause', 'children': ['173']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'pat'}; {'id': '174', 'type': 'except_clause', 'children': ['175', '181']}; {'id': '175', 'type': 'as_pattern', 'children': ['176', '179']}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '179', 'type': 'as_pattern_target', 'children': ['180']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '181', 'type': 'block', 'children': ['182']}; {'id': '182', 'type': 'raise_statement', 'children': ['183']}; {'id': '183', 'type': 'call', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'LogRaptorArgumentError'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'binary_operator', 'children': ['187', '188'], 'value': '%'}; {'id': '187', 'type': 'string', 'children': [], 'value': "'wrong regex syntax for pattern: %r'"}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'err'}
A tuple with re.RegexObject objects created from regex pattern arguments.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'qualify'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'worker'}; {'id': '7', 'type': 'block', 'children': ['8', '15', '21', '27', '37', '47', '55', '121', '128', '138', '152', '181', '191', '198', '214', '224', '240']}; {'id': '8', 'type': 'import_from_statement', 'children': ['9', '13']}; {'id': '9', 'type': 'dotted_name', 'children': ['10', '11', '12']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'boto'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'mturk'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'connection'}; {'id': '13', 'type': 'dotted_name', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'MTurkConnection'}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'PsiturkConfig'}; {'id': '20', 'type': 'argument_list', 'children': []}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'load_config'}; {'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': 'aws_access_key_id'}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '34', 'type': 'argument_list', 'children': ['35', '36']}; {'id': '35', 'type': 'string', 'children': [], 'value': "'AWS Access'"}; {'id': '36', 'type': 'string', 'children': [], 'value': "'aws_access_key_id'"}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'aws_secret_access_key'}; {'id': '40', 'type': 'call', 'children': ['41', '44']}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '44', 'type': 'argument_list', 'children': ['45', '46']}; {'id': '45', 'type': 'string', 'children': [], 'value': "'AWS Access'"}; {'id': '46', 'type': 'string', 'children': [], 'value': "'aws_secret_access_key'"}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'conn'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'MTurkConnection'}; {'id': '52', 'type': 'argument_list', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'aws_access_key_id'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'aws_secret_access_key'}; {'id': '55', 'type': 'function_definition', 'children': ['56', '57', '59']}; {'id': '56', 'type': 'function_name', 'children': [], 'value': 'get_workers_with_qualification'}; {'id': '57', 'type': 'parameters', 'children': ['58']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '59', 'type': 'block', 'children': ['60', '64', '68', '72', '119']}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '63', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'continue_flag'}; {'id': '67', 'type': 'True', 'children': []}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'page'}; {'id': '71', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '72', 'type': 'while_statement', 'children': ['73', '75']}; {'id': '73', 'type': '()', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'continue_flag'}; {'id': '75', 'type': 'block', 'children': ['76', '91']}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'new_results'}; {'id': '79', 'type': 'call', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'conn'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'get_qualifications_for_qualification_type'}; {'id': '83', 'type': 'argument_list', 'children': ['84', '85', '88']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '85', 'type': 'keyword_argument', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'page_size'}; {'id': '87', 'type': 'integer', 'children': [], 'value': '100'}; {'id': '88', 'type': 'keyword_argument', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'page_number'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'page'}; {'id': '91', 'type': 'if_statement', 'children': ['92', '99', '104']}; {'id': '92', 'type': '()', 'children': ['93']}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '98'], 'value': '=='}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'new_results'}; {'id': '98', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '99', 'type': 'block', 'children': ['100']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'continue_flag'}; {'id': '103', 'type': 'False', 'children': []}; {'id': '104', 'type': 'else_clause', 'children': ['105']}; {'id': '105', 'type': 'block', 'children': ['106', '113']}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'new_results'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'page'}; {'id': '116', 'type': 'binary_operator', 'children': ['117', '118'], 'value': '+'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'page'}; {'id': '118', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '119', 'type': 'return_statement', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '124', 'type': 'call', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'get_workers_with_qualification'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'assignment', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'workers'}; {'id': '131', 'type': 'list_comprehension', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'SubjectId'}; {'id': '135', 'type': 'for_in_clause', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'call', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'string', 'children': [], 'value': '"Assigning qualification {} with value {} to worker {}"'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '148', 'type': 'argument_list', 'children': ['149', '150', '151']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'worker'}; {'id': '152', 'type': 'if_statement', 'children': ['153', '156', '168']}; {'id': '153', 'type': 'comparison_operator', 'children': ['154', '155'], 'value': 'in'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'worker'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'workers'}; {'id': '156', 'type': 'block', 'children': ['157']}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'conn'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'update_qualification_score'}; {'id': '164', 'type': 'argument_list', 'children': ['165', '166', '167']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'worker'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '168', 'type': 'else_clause', 'children': ['169']}; {'id': '169', 'type': 'block', 'children': ['170']}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'assignment', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '173', 'type': 'call', 'children': ['174', '177']}; {'id': '174', 'type': 'attribute', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'conn'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'assign_qualification'}; {'id': '177', 'type': 'argument_list', 'children': ['178', '179', '180']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'worker'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '181', 'type': 'if_statement', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '183', 'type': 'block', 'children': ['184']}; {'id': '184', 'type': 'expression_statement', 'children': ['185']}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '189', 'type': 'argument_list', 'children': ['190']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'assignment', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '194', 'type': 'call', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'get_workers_with_qualification'}; {'id': '196', 'type': 'argument_list', 'children': ['197']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'call', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'string', 'children': [], 'value': '"{} workers with qualification {}:"'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '208', 'type': 'argument_list', 'children': ['209', '213']}; {'id': '209', 'type': 'call', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '211', 'type': 'argument_list', 'children': ['212']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'qualification'}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'assignment', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '217', 'type': 'list_comprehension', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'IntegerValue'}; {'id': '221', 'type': 'for_in_clause', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '224', 'type': 'expression_statement', 'children': ['225']}; {'id': '225', 'type': 'assignment', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'unique_values'}; {'id': '227', 'type': 'call', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'call', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '232', 'type': 'argument_list', 'children': ['233']}; {'id': '233', 'type': 'list_comprehension', 'children': ['234', '237']}; {'id': '234', 'type': 'attribute', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'IntegerValue'}; {'id': '237', 'type': 'for_in_clause', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '240', 'type': 'for_statement', 'children': ['241', '242', '243']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'unique_values'}; {'id': '243', 'type': 'block', 'children': ['244']}; {'id': '244', 'type': 'expression_statement', 'children': ['245']}; {'id': '245', 'type': 'call', 'children': ['246', '249']}; {'id': '246', 'type': 'attribute', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '249', 'type': 'argument_list', 'children': ['250']}; {'id': '250', 'type': 'call', 'children': ['251', '254']}; {'id': '251', 'type': 'attribute', 'children': ['252', '253']}; {'id': '252', 'type': 'string', 'children': [], 'value': '"{} with value {}"'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '254', 'type': 'argument_list', 'children': ['255', '267']}; {'id': '255', 'type': 'call', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '257', 'type': 'argument_list', 'children': ['258']}; {'id': '258', 'type': 'list_comprehension', 'children': ['259', '260', '263']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '260', 'type': 'for_in_clause', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '263', 'type': 'if_clause', 'children': ['264']}; {'id': '264', 'type': 'comparison_operator', 'children': ['265', '266'], 'value': '=='}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'v'}
Assign a qualification to a worker.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'load_stdlib'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '7', '12', '49', '74', '96', '105', '192']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'string', 'children': [], 'value': "'''Scans sys.path for standard library modules.\n '''"}; {'id': '7', 'type': 'if_statement', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': '_stdlib'}; {'id': '9', 'type': 'block', 'children': ['10']}; {'id': '10', 'type': 'return_statement', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': '_stdlib'}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'prefixes'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'set_comprehension', 'children': ['19', '27']}; {'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': 'os'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '27', 'type': 'for_in_clause', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '29', 'type': 'tuple', 'children': ['30', '33', '41']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '35', 'type': 'argument_list', 'children': ['36', '37', '38']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '37', 'type': 'string', 'children': [], 'value': "'real_prefix'"}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '45', '46']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '45', 'type': 'string', 'children': [], 'value': "'base_prefix'"}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '49', 'type': 'for_statement', 'children': ['50', '51', '54']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'sp'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '54', 'type': 'block', 'children': ['55', '60']}; {'id': '55', 'type': 'if_statement', 'children': ['56', '58']}; {'id': '56', 'type': 'not_operator', 'children': ['57']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'sp'}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'continue_statement', 'children': []}; {'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': '_import_paths'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '65', 'type': 'argument_list', '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': 'os'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '72', 'type': 'argument_list', 'children': ['73']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'sp'}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'stdpaths'}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'set_comprehension', 'children': ['81', '82', '85']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '82', 'type': 'for_in_clause', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': '_import_paths'}; {'id': '85', 'type': 'if_clause', 'children': ['86']}; {'id': '86', 'type': 'boolean_operator', 'children': ['87', '93'], 'value': 'and'}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'prefixes'}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '95'], 'value': 'not'}; {'id': '94', 'type': 'string', 'children': [], 'value': "'site-packages'"}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': '_stdlib'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'builtin_module_names'}; {'id': '105', 'type': 'for_statement', 'children': ['106', '107', '108']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'stdpath'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'stdpaths'}; {'id': '108', 'type': 'block', 'children': ['109', '121']}; {'id': '109', 'type': 'if_statement', 'children': ['110', '119']}; {'id': '110', 'type': 'not_operator', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '117']}; {'id': '112', 'type': 'attribute', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '117', 'type': 'argument_list', 'children': ['118']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'stdpath'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'continue_statement', 'children': []}; {'id': '121', 'type': 'for_statement', 'children': ['122', '123', '129']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '123', 'type': 'call', 'children': ['124', '127']}; {'id': '124', 'type': 'attribute', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'listdir'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'stdpath'}; {'id': '129', 'type': 'block', 'children': ['130', '143', '155', '177']}; {'id': '130', 'type': 'if_statement', 'children': ['131', '141']}; {'id': '131', 'type': 'boolean_operator', 'children': ['132', '138'], 'value': 'or'}; {'id': '132', 'type': 'call', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'string', 'children': [], 'value': "'.'"}; {'id': '138', 'type': 'comparison_operator', 'children': ['139', '140'], 'value': '=='}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '140', 'type': 'string', 'children': [], 'value': "'site-packages'"}; {'id': '141', 'type': 'block', 'children': ['142']}; {'id': '142', 'type': 'continue_statement', 'children': []}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'assignment', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '146', 'type': 'call', 'children': ['147', '152']}; {'id': '147', 'type': 'attribute', 'children': ['148', '151']}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '152', 'type': 'argument_list', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'stdpath'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '155', 'type': 'if_statement', 'children': ['156', '175']}; {'id': '156', 'type': 'boolean_operator', 'children': ['157', '166'], 'value': 'and'}; {'id': '157', 'type': 'not_operator', 'children': ['158']}; {'id': '158', 'type': 'call', 'children': ['159', '164']}; {'id': '159', 'type': 'attribute', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '166', 'type': 'not_operator', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'endswith'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'tuple', 'children': ['173', '174']}; {'id': '173', 'type': 'string', 'children': [], 'value': "'.py'"}; {'id': '174', 'type': 'string', 'children': [], 'value': "'.so'"}; {'id': '175', 'type': 'block', 'children': ['176']}; {'id': '176', 'type': 'continue_statement', 'children': []}; {'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': '_stdlib'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'subscript', 'children': ['184', '191']}; {'id': '184', 'type': 'call', 'children': ['185', '188']}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '188', 'type': 'argument_list', 'children': ['189', '190']}; {'id': '189', 'type': 'string', 'children': [], 'value': "'.'"}; {'id': '190', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '191', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '192', 'type': 'return_statement', 'children': ['193']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': '_stdlib'}
Scans sys.path for standard library modules.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'is_python_script'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '5', 'type': 'block', 'children': ['6', '8', '22', '35', '78']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'string', 'children': [], 'value': "'''Checks a file to see if it's a python script of some sort.\n '''"}; {'id': '8', 'type': 'if_statement', 'children': ['9', '19']}; {'id': '9', 'type': 'call', 'children': ['10', '17']}; {'id': '10', 'type': 'attribute', 'children': ['11', '16']}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '15', 'type': 'argument_list', 'children': []}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'endswith'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'.py'"}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'return_statement', 'children': ['21']}; {'id': '21', 'type': 'True', 'children': []}; {'id': '22', 'type': 'if_statement', 'children': ['23', '32']}; {'id': '23', 'type': 'not_operator', 'children': ['24']}; {'id': '24', 'type': 'call', 'children': ['25', '30']}; {'id': '25', 'type': 'attribute', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'return_statement', 'children': ['34']}; {'id': '34', 'type': 'False', 'children': []}; {'id': '35', 'type': 'try_statement', 'children': ['36', '74']}; {'id': '36', 'type': 'block', 'children': ['37']}; {'id': '37', 'type': 'with_statement', 'children': ['38', '48', '73']}; {'id': '38', 'type': 'with_clause', 'children': ['39']}; {'id': '39', 'type': 'with_item', 'children': ['40']}; {'id': '40', 'type': 'as_pattern', 'children': ['41', '46']}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '45', 'type': 'string', 'children': [], 'value': "'rb'"}; {'id': '46', 'type': 'as_pattern_target', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'fp'}; {'id': '48', 'type': 'ERROR', 'children': ['49']}; {'id': '49', 'type': 'comparison_operator', 'children': ['50', '56', '59'], 'value': '!='}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'fp'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'read'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '56', 'type': 'ERROR', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'return'}; {'id': '58', 'type': 'False', 'children': []}; {'id': '59', 'type': 'call', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '63', 'type': 'argument_list', 'children': ['64', '65']}; {'id': '64', 'type': 'string', 'children': [], 'value': "r'.*python'"}; {'id': '65', 'type': 'call', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'str_'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'fp'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '72', 'type': 'argument_list', 'children': []}; {'id': '73', 'type': 'block', 'children': [], 'value': ''}; {'id': '74', 'type': 'except_clause', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'pass_statement', 'children': []}; {'id': '78', 'type': 'return_statement', 'children': ['79']}; {'id': '79', 'type': 'False', 'children': []}
Checks a file to see if it's a python script of some sort.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_departures'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'stop_id'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'route'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'api_key'}; {'id': '9', 'type': 'block', 'children': ['10', '16', '22', '28', '34', '49', '57', '67', '97', '115', '123', '143', '147', '151', '323', '379']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'stop_id'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'stop_id'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'route'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'route'}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'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': 'api_key'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'api_key'}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'assignment', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '37', 'type': 'binary_operator', 'children': ['38', '47', '48'], 'value': '+'}; {'id': '38', 'type': 'binary_operator', 'children': ['39', '43', '44'], 'value': '+'}; {'id': '39', 'type': 'concatenated_string', 'children': ['40', '41', '42']}; {'id': '40', 'type': 'string', 'children': [], 'value': "'https://api.transport.nsw.gov.au/v1/tp/departure_mon?'"}; {'id': '41', 'type': 'string', 'children': [], 'value': "'outputFormat=rapidJSON&coordOutputFormat=EPSG%3A4326&'"}; {'id': '42', 'type': 'string', 'children': [], 'value': "'mode=direct&type_dm=stop&name_dm='"}; {'id': '43', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'stop_id'}; {'id': '47', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '48', 'type': 'string', 'children': [], 'value': "'&departureMonitorMacro=true&TfNSWDM=true&version=10.2.1.42'"}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'auth'}; {'id': '52', 'type': 'binary_operator', 'children': ['53', '54'], 'value': '+'}; {'id': '53', 'type': 'string', 'children': [], 'value': "'apikey '"}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'api_key'}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '60', 'type': 'dictionary', 'children': ['61', '64']}; {'id': '61', 'type': 'pair', 'children': ['62', '63']}; {'id': '62', 'type': 'string', 'children': [], 'value': "'Accept'"}; {'id': '63', 'type': 'string', 'children': [], 'value': "'application/json'"}; {'id': '64', 'type': 'pair', 'children': ['65', '66']}; {'id': '65', 'type': 'string', 'children': [], 'value': "'Authorization'"}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'auth'}; {'id': '67', 'type': 'try_statement', 'children': ['68', '84']}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'requests'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '76', 'type': 'argument_list', 'children': ['77', '78', '81']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '78', 'type': 'keyword_argument', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '81', 'type': 'keyword_argument', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'timeout'}; {'id': '83', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '84', 'type': 'except_clause', 'children': ['85']}; {'id': '85', 'type': 'block', 'children': ['86', '93']}; {'id': '86', 'type': 'expression_statement', 'children': ['87']}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'string', 'children': [], 'value': '"Network or Timeout error"'}; {'id': '93', 'type': 'return_statement', 'children': ['94']}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '103']}; {'id': '98', 'type': 'comparison_operator', 'children': ['99', '102'], 'value': '!='}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'status_code'}; {'id': '102', 'type': 'integer', 'children': [], 'value': '200'}; {'id': '103', 'type': 'block', 'children': ['104', '111']}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'call', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'string', 'children': [], 'value': '"Error with the request sent; check api key"'}; {'id': '111', 'type': 'return_statement', 'children': ['112']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '118', 'type': 'call', 'children': ['119', '122']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '122', 'type': 'argument_list', 'children': []}; {'id': '123', 'type': 'try_statement', 'children': ['124', '129']}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'subscript', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'stopEvents'"}; {'id': '129', 'type': 'except_clause', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '131', 'type': 'block', 'children': ['132', '139']}; {'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': 'logger'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'string', 'children': [], 'value': '"No stop events for this query"'}; {'id': '139', 'type': 'return_statement', 'children': ['140']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '143', 'type': 'expression_statement', 'children': ['144']}; {'id': '144', 'type': 'assignment', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'maxresults'}; {'id': '146', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'assignment', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '150', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '151', 'type': 'if_statement', 'children': ['152', '157', '222', '291']}; {'id': '152', 'type': 'comparison_operator', 'children': ['153', '156'], 'value': '!='}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '156', 'type': 'string', 'children': [], 'value': "''"}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'for_statement', 'children': ['159', '160', '169']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'call', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '165', 'type': 'argument_list', 'children': ['166']}; {'id': '166', 'type': 'subscript', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '168', 'type': 'string', 'children': [], 'value': "'stopEvents'"}; {'id': '169', 'type': 'block', 'children': ['170', '184']}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'assignment', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '173', 'type': 'subscript', 'children': ['174', '183']}; {'id': '174', 'type': 'subscript', 'children': ['175', '182']}; {'id': '175', 'type': 'subscript', 'children': ['176', '181']}; {'id': '176', 'type': 'subscript', 'children': ['177', '180']}; {'id': '177', 'type': 'subscript', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '179', 'type': 'string', 'children': [], 'value': "'stopEvents'"}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '181', 'type': 'string', 'children': [], 'value': "'transportation'"}; {'id': '182', 'type': 'string', 'children': [], 'value': "'destination'"}; {'id': '183', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '184', 'type': 'if_statement', 'children': ['185', '190']}; {'id': '185', 'type': 'comparison_operator', 'children': ['186', '187'], 'value': '=='}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'destination'}; {'id': '190', 'type': 'block', 'children': ['191', '201', '213']}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'assignment', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '194', 'type': 'call', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'parseEvent'}; {'id': '198', 'type': 'argument_list', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '201', 'type': 'if_statement', 'children': ['202', '205']}; {'id': '202', 'type': 'comparison_operator', 'children': ['203', '204'], 'value': '!='}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '204', 'type': 'None', 'children': []}; {'id': '205', 'type': 'block', 'children': ['206']}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '211', 'type': 'argument_list', 'children': ['212']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '213', 'type': 'if_statement', 'children': ['214', '220']}; {'id': '214', 'type': 'comparison_operator', 'children': ['215', '219'], 'value': '>='}; {'id': '215', 'type': 'call', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '217', 'type': 'argument_list', 'children': ['218']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'maxresults'}; {'id': '220', 'type': 'block', 'children': ['221']}; {'id': '221', 'type': 'break_statement', 'children': []}; {'id': '222', 'type': 'elif_clause', 'children': ['223', '228']}; {'id': '223', 'type': 'comparison_operator', 'children': ['224', '227'], 'value': '!='}; {'id': '224', 'type': 'attribute', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'route'}; {'id': '227', 'type': 'string', 'children': [], 'value': "''"}; {'id': '228', 'type': 'block', 'children': ['229']}; {'id': '229', 'type': 'for_statement', 'children': ['230', '231', '240']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '231', 'type': 'call', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '233', 'type': 'argument_list', 'children': ['234']}; {'id': '234', 'type': 'call', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '236', 'type': 'argument_list', 'children': ['237']}; {'id': '237', 'type': 'subscript', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '239', 'type': 'string', 'children': [], 'value': "'stopEvents'"}; {'id': '240', 'type': 'block', 'children': ['241', '253']}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'assignment', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '244', 'type': 'subscript', 'children': ['245', '252']}; {'id': '245', 'type': 'subscript', 'children': ['246', '251']}; {'id': '246', 'type': 'subscript', 'children': ['247', '250']}; {'id': '247', 'type': 'subscript', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '249', 'type': 'string', 'children': [], 'value': "'stopEvents'"}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '251', 'type': 'string', 'children': [], 'value': "'transportation'"}; {'id': '252', 'type': 'string', 'children': [], 'value': "'number'"}; {'id': '253', 'type': 'if_statement', 'children': ['254', '259']}; {'id': '254', 'type': 'comparison_operator', 'children': ['255', '256'], 'value': '=='}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '256', 'type': 'attribute', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'route'}; {'id': '259', 'type': 'block', 'children': ['260', '270', '282']}; {'id': '260', 'type': 'expression_statement', 'children': ['261']}; {'id': '261', 'type': 'assignment', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '263', 'type': 'call', 'children': ['264', '267']}; {'id': '264', 'type': 'attribute', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'parseEvent'}; {'id': '267', 'type': 'argument_list', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '270', 'type': 'if_statement', 'children': ['271', '274']}; {'id': '271', 'type': 'comparison_operator', 'children': ['272', '273'], 'value': '!='}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '273', 'type': 'None', 'children': []}; {'id': '274', 'type': 'block', 'children': ['275']}; {'id': '275', 'type': 'expression_statement', 'children': ['276']}; {'id': '276', 'type': 'call', 'children': ['277', '280']}; {'id': '277', 'type': 'attribute', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '280', 'type': 'argument_list', 'children': ['281']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '282', 'type': 'if_statement', 'children': ['283', '289']}; {'id': '283', 'type': 'comparison_operator', 'children': ['284', '288'], 'value': '>='}; {'id': '284', 'type': 'call', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '286', 'type': 'argument_list', 'children': ['287']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'maxresults'}; {'id': '289', 'type': 'block', 'children': ['290']}; {'id': '290', 'type': 'break_statement', 'children': []}; {'id': '291', 'type': 'else_clause', 'children': ['292']}; {'id': '292', 'type': 'block', 'children': ['293']}; {'id': '293', 'type': 'for_statement', 'children': ['294', '295', '300']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '295', 'type': 'call', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '297', 'type': 'argument_list', 'children': ['298', '299']}; {'id': '298', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'maxresults'}; {'id': '300', 'type': 'block', 'children': ['301', '311']}; {'id': '301', 'type': 'expression_statement', 'children': ['302']}; {'id': '302', 'type': 'assignment', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '304', 'type': 'call', 'children': ['305', '308']}; {'id': '305', 'type': 'attribute', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'parseEvent'}; {'id': '308', 'type': 'argument_list', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '311', 'type': 'if_statement', 'children': ['312', '315']}; {'id': '312', 'type': 'comparison_operator', 'children': ['313', '314'], 'value': '!='}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '314', 'type': 'None', 'children': []}; {'id': '315', 'type': 'block', 'children': ['316']}; {'id': '316', 'type': 'expression_statement', 'children': ['317']}; {'id': '317', 'type': 'call', 'children': ['318', '321']}; {'id': '318', 'type': 'attribute', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '321', 'type': 'argument_list', 'children': ['322']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '323', 'type': 'if_statement', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '325', 'type': 'block', 'children': ['326']}; {'id': '326', 'type': 'expression_statement', 'children': ['327']}; {'id': '327', 'type': 'assignment', 'children': ['328', '331']}; {'id': '328', 'type': 'attribute', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '331', 'type': 'dictionary', 'children': ['332', '337', '344', '351', '358', '365', '372']}; {'id': '332', 'type': 'pair', 'children': ['333', '334']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'ATTR_STOP_ID'}; {'id': '334', 'type': 'attribute', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'stop_id'}; {'id': '337', 'type': 'pair', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'ATTR_ROUTE'}; {'id': '339', 'type': 'subscript', 'children': ['340', '343']}; {'id': '340', 'type': 'subscript', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '342', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '343', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '344', 'type': 'pair', 'children': ['345', '346']}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'ATTR_DUE_IN'}; {'id': '346', 'type': 'subscript', 'children': ['347', '350']}; {'id': '347', 'type': 'subscript', 'children': ['348', '349']}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '349', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '350', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '351', 'type': 'pair', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'ATTR_DELAY'}; {'id': '353', 'type': 'subscript', 'children': ['354', '357']}; {'id': '354', 'type': 'subscript', 'children': ['355', '356']}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '356', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '357', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '358', 'type': 'pair', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'ATTR_REALTIME'}; {'id': '360', 'type': 'subscript', 'children': ['361', '364']}; {'id': '361', 'type': 'subscript', 'children': ['362', '363']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '363', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '364', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '365', 'type': 'pair', 'children': ['366', '367']}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'ATTR_DESTINATION'}; {'id': '367', 'type': 'subscript', 'children': ['368', '371']}; {'id': '368', 'type': 'subscript', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '370', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '371', 'type': 'integer', 'children': [], 'value': '6'}; {'id': '372', 'type': 'pair', 'children': ['373', '374']}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'ATTR_MODE'}; {'id': '374', 'type': 'subscript', 'children': ['375', '378']}; {'id': '375', 'type': 'subscript', 'children': ['376', '377']}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'monitor'}; {'id': '377', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '378', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '379', 'type': 'return_statement', 'children': ['380']}; {'id': '380', 'type': 'attribute', 'children': ['381', '382']}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '382', 'type': 'identifier', 'children': [], 'value': 'info'}
Get the latest data from Transport NSW.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '13']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'pw'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8', '9', '10', '11', '12']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'user_pattern'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'strict_flag'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'user_flag'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'edit_subcommand'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'gen_subcommand'}; {'id': '13', 'type': 'block', 'children': ['14', '33', '43', '73', '103', '112', '128', '138', '145', '172', '198']}; {'id': '14', 'type': 'function_definition', 'children': ['15', '16', '19']}; {'id': '15', 'type': 'function_name', 'children': [], 'value': 'handle_sigint'}; {'id': '16', 'type': 'parameters', 'children': ['17']}; {'id': '17', 'type': 'list_splat_pattern', 'children': ['18']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '19', 'type': 'block', 'children': ['20', '26']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '25', 'type': 'argument_list', 'children': []}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'call', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'signal'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'signal'}; {'id': '38', 'type': 'argument_list', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'signal'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'SIGINT'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'handle_sigint'}; {'id': '43', 'type': 'if_statement', 'children': ['44', '45', '63']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'gen_subcommand'}; {'id': '45', 'type': 'block', 'children': ['46', '56', '62']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '49', 'type': 'conditional_expression', 'children': ['50', '54', '55'], 'value': 'if'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '55', 'type': 'None', 'children': []}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'generate_password'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '62', 'type': 'return_statement', 'children': []}; {'id': '63', 'type': 'elif_clause', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'edit_subcommand'}; {'id': '65', 'type': 'block', 'children': ['66', '72']}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'launch_editor'}; {'id': '69', 'type': 'argument_list', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '72', 'type': 'return_statement', 'children': []}; {'id': '73', 'type': 'if_statement', 'children': ['74', '83']}; {'id': '74', 'type': 'not_operator', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '81']}; {'id': '76', 'type': 'attribute', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'exists'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '83', 'type': 'block', 'children': ['84', '96']}; {'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': 'click'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '89', 'type': 'argument_list', 'children': ['90', '93']}; {'id': '90', 'type': 'binary_operator', 'children': ['91', '92'], 'value': '%'}; {'id': '91', 'type': 'string', 'children': [], 'value': '"error: password store not found at \'%s\'"'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '93', 'type': 'keyword_argument', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '95', 'type': 'True', 'children': []}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'store'}; {'id': '106', 'type': 'call', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'Store'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '110', 'type': 'argument_list', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '112', 'type': 'if_statement', 'children': ['113', '115']}; {'id': '113', 'type': 'not_operator', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'user_pattern'}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'assignment', 'children': ['118', '122']}; {'id': '118', 'type': 'pattern_list', 'children': ['119', '120', '121']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'user_pattern'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '122', 'type': 'call', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'rpartition'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'string', 'children': [], 'value': '"@"'}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'assignment', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '131', 'type': 'call', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'store'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'search'}; {'id': '135', 'type': 'argument_list', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'user_pattern'}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '141', 'type': 'call', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '145', 'type': 'if_statement', 'children': ['146', '154']}; {'id': '146', 'type': 'boolean_operator', 'children': ['147', '148'], 'value': 'and'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'strict_flag'}; {'id': '148', 'type': 'comparison_operator', 'children': ['149', '153'], 'value': '!='}; {'id': '149', 'type': 'call', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '151', 'type': 'argument_list', 'children': ['152']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '153', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '154', 'type': 'block', 'children': ['155', '165']}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '160', 'type': 'argument_list', 'children': ['161', '162']}; {'id': '161', 'type': 'string', 'children': [], 'value': '"error: multiple or no records found (but using --strict flag)"'}; {'id': '162', 'type': 'keyword_argument', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '164', 'type': 'True', 'children': []}; {'id': '165', 'type': 'expression_statement', 'children': ['166']}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '170', 'type': 'argument_list', 'children': ['171']}; {'id': '171', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '172', 'type': 'if_statement', 'children': ['173', '178']}; {'id': '173', 'type': 'comparison_operator', 'children': ['174', '175'], 'value': '=='}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '175', 'type': 'attribute', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'Mode'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'RAW'}; {'id': '178', 'type': 'block', 'children': ['179', '197']}; {'id': '179', 'type': 'for_statement', 'children': ['180', '181', '182']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '182', 'type': 'block', 'children': ['183']}; {'id': '183', 'type': 'expression_statement', 'children': ['184']}; {'id': '184', 'type': 'call', 'children': ['185', '188']}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '188', 'type': 'argument_list', 'children': ['189']}; {'id': '189', 'type': 'conditional_expression', 'children': ['190', '193', '194'], 'value': 'if'}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'user_flag'}; {'id': '194', 'type': 'attribute', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'password'}; {'id': '197', 'type': 'return_statement', 'children': []}; {'id': '198', 'type': 'for_statement', 'children': ['199', '202', '206']}; {'id': '199', 'type': 'pattern_list', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '202', 'type': 'call', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '204', 'type': 'argument_list', 'children': ['205']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '206', 'type': 'block', 'children': ['207', '217', '234', '314', '380']}; {'id': '207', 'type': 'expression_statement', 'children': ['208']}; {'id': '208', 'type': 'assignment', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '210', 'type': 'call', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'highlight_match'}; {'id': '212', 'type': 'argument_list', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'key_pattern'}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '217', 'type': 'if_statement', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '221', 'type': 'block', 'children': ['222']}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'augmented_assignment', 'children': ['224', '225'], 'value': '+='}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '225', 'type': 'binary_operator', 'children': ['226', '227'], 'value': '+'}; {'id': '226', 'type': 'string', 'children': [], 'value': '": "'}; {'id': '227', 'type': 'call', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'highlight_match'}; {'id': '229', 'type': 'argument_list', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'user_pattern'}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '234', 'type': 'if_statement', 'children': ['235', '243', '255']}; {'id': '235', 'type': 'boolean_operator', 'children': ['236', '241'], 'value': 'and'}; {'id': '236', 'type': 'comparison_operator', 'children': ['237', '238'], 'value': '=='}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'Mode'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'ECHO'}; {'id': '241', 'type': 'not_operator', 'children': ['242']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'user_flag'}; {'id': '243', 'type': 'block', 'children': ['244']}; {'id': '244', 'type': 'expression_statement', 'children': ['245']}; {'id': '245', 'type': 'augmented_assignment', 'children': ['246', '247'], 'value': '+='}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '247', 'type': 'binary_operator', 'children': ['248', '249'], 'value': '+'}; {'id': '248', 'type': 'string', 'children': [], 'value': '" | "'}; {'id': '249', 'type': 'call', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'style_password'}; {'id': '251', 'type': 'argument_list', 'children': ['252']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'password'}; {'id': '255', 'type': 'elif_clause', 'children': ['256', '265']}; {'id': '256', 'type': 'boolean_operator', 'children': ['257', '262'], 'value': 'and'}; {'id': '257', 'type': 'comparison_operator', 'children': ['258', '259'], 'value': '=='}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '259', 'type': 'attribute', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'Mode'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'COPY'}; {'id': '262', 'type': 'comparison_operator', 'children': ['263', '264'], 'value': '=='}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '264', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '265', 'type': 'block', 'children': ['266', '308']}; {'id': '266', 'type': 'try_statement', 'children': ['267', '298']}; {'id': '267', 'type': 'block', 'children': ['268', '271', '285']}; {'id': '268', 'type': 'import_statement', 'children': ['269']}; {'id': '269', 'type': 'dotted_name', 'children': ['270']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'pyperclip'}; {'id': '271', 'type': 'expression_statement', 'children': ['272']}; {'id': '272', 'type': 'call', 'children': ['273', '276']}; {'id': '273', 'type': 'attribute', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'pyperclip'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '276', 'type': 'argument_list', 'children': ['277']}; {'id': '277', 'type': 'conditional_expression', 'children': ['278', '281', '282'], 'value': 'if'}; {'id': '278', 'type': 'attribute', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'user_flag'}; {'id': '282', 'type': 'attribute', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'password'}; {'id': '285', 'type': 'expression_statement', 'children': ['286']}; {'id': '286', 'type': 'assignment', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '288', 'type': 'call', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'style_success'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'binary_operator', 'children': ['292', '293'], 'value': '%'}; {'id': '292', 'type': 'string', 'children': [], 'value': '"*** %s COPIED TO CLIPBOARD ***"'}; {'id': '293', 'type': '()', 'children': ['294']}; {'id': '294', 'type': 'conditional_expression', 'children': ['295', '296', '297'], 'value': 'if'}; {'id': '295', 'type': 'string', 'children': [], 'value': '"USERNAME"'}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'user_flag'}; {'id': '297', 'type': 'string', 'children': [], 'value': '"PASSWORD"'}; {'id': '298', 'type': 'except_clause', 'children': ['299', '300']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'ImportError'}; {'id': '300', 'type': 'block', 'children': ['301']}; {'id': '301', 'type': 'expression_statement', 'children': ['302']}; {'id': '302', 'type': 'assignment', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '304', 'type': 'call', 'children': ['305', '306']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'style_error'}; {'id': '306', 'type': 'argument_list', 'children': ['307']}; {'id': '307', 'type': 'string', 'children': [], 'value': '\'*** PYTHON PACKAGE "PYPERCLIP" NOT FOUND ***\''}; {'id': '308', 'type': 'expression_statement', 'children': ['309']}; {'id': '309', 'type': 'augmented_assignment', 'children': ['310', '311'], 'value': '+='}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '311', 'type': 'binary_operator', 'children': ['312', '313'], 'value': '+'}; {'id': '312', 'type': 'string', 'children': [], 'value': '" | "'}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '314', 'type': 'if_statement', 'children': ['315', '318']}; {'id': '315', 'type': 'attribute', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'notes'}; {'id': '318', 'type': 'block', 'children': ['319']}; {'id': '319', 'type': 'if_statement', 'children': ['320', '323', '348']}; {'id': '320', 'type': 'comparison_operator', 'children': ['321', '322'], 'value': '=='}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'idx'}; {'id': '322', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '323', 'type': 'block', 'children': ['324', '328']}; {'id': '324', 'type': 'expression_statement', 'children': ['325']}; {'id': '325', 'type': 'augmented_assignment', 'children': ['326', '327'], 'value': '+='}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '327', 'type': 'string', 'children': [], 'value': '"\\n"'}; {'id': '328', 'type': 'expression_statement', 'children': ['329']}; {'id': '329', 'type': 'augmented_assignment', 'children': ['330', '331'], 'value': '+='}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '331', 'type': 'call', 'children': ['332', '335']}; {'id': '332', 'type': 'attribute', 'children': ['333', '334']}; {'id': '333', 'type': 'string', 'children': [], 'value': '"\\n"'}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '335', 'type': 'generator_expression', 'children': ['336', '339']}; {'id': '336', 'type': 'binary_operator', 'children': ['337', '338'], 'value': '+'}; {'id': '337', 'type': 'string', 'children': [], 'value': '" "'}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '339', 'type': 'for_in_clause', 'children': ['340', '341']}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '341', 'type': 'call', 'children': ['342', '347']}; {'id': '342', 'type': 'attribute', 'children': ['343', '346']}; {'id': '343', 'type': 'attribute', 'children': ['344', '345']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'notes'}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'splitlines'}; {'id': '347', 'type': 'argument_list', 'children': []}; {'id': '348', 'type': 'else_clause', 'children': ['349']}; {'id': '349', 'type': 'block', 'children': ['350', '360', '368']}; {'id': '350', 'type': 'expression_statement', 'children': ['351']}; {'id': '351', 'type': 'assignment', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '353', 'type': 'call', 'children': ['354', '359']}; {'id': '354', 'type': 'attribute', 'children': ['355', '358']}; {'id': '355', 'type': 'attribute', 'children': ['356', '357']}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'notes'}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'splitlines'}; {'id': '359', 'type': 'argument_list', 'children': []}; {'id': '360', 'type': 'expression_statement', 'children': ['361']}; {'id': '361', 'type': 'augmented_assignment', 'children': ['362', '363'], 'value': '+='}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '363', 'type': 'binary_operator', 'children': ['364', '365'], 'value': '+'}; {'id': '364', 'type': 'string', 'children': [], 'value': '" | "'}; {'id': '365', 'type': 'subscript', 'children': ['366', '367']}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '367', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '368', 'type': 'if_statement', 'children': ['369', '375']}; {'id': '369', 'type': 'comparison_operator', 'children': ['370', '374'], 'value': '>'}; {'id': '370', 'type': 'call', 'children': ['371', '372']}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '372', 'type': 'argument_list', 'children': ['373']}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '374', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '375', 'type': 'block', 'children': ['376']}; {'id': '376', 'type': 'expression_statement', 'children': ['377']}; {'id': '377', 'type': 'augmented_assignment', 'children': ['378', '379'], 'value': '+='}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '379', 'type': 'string', 'children': [], 'value': '" (...)"'}; {'id': '380', 'type': 'expression_statement', 'children': ['381']}; {'id': '381', 'type': 'call', 'children': ['382', '385']}; {'id': '382', 'type': 'attribute', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '385', 'type': 'argument_list', 'children': ['386']}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'line'}
Search for USER and KEY in GPG-encrypted password file.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'launch_editor'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '6', 'type': 'block', 'children': ['7', '18', '36', '66', '75', '101', '133', '142', '165', '178', '187', '211']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'editor'}; {'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': 'os'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'string', 'children': [], 'value': '"PW_EDITOR"'}; {'id': '18', 'type': 'if_statement', 'children': ['19', '21']}; {'id': '19', 'type': 'not_operator', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'editor'}; {'id': '21', 'type': 'block', 'children': ['22', '29']}; {'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': 'click'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'string', 'children': [], 'value': '"error: no editor set in PW_EDITOR environment variables"'}; {'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': 'ctx'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '46']}; {'id': '37', 'type': 'not_operator', 'children': ['38']}; {'id': '38', 'type': 'call', 'children': ['39', '44']}; {'id': '39', 'type': 'attribute', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'exists'}; {'id': '44', 'type': 'argument_list', 'children': ['45']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '46', 'type': 'block', 'children': ['47', '59']}; {'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': 'click'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '52', 'type': 'argument_list', 'children': ['53', '56']}; {'id': '53', 'type': 'binary_operator', 'children': ['54', '55'], 'value': '%'}; {'id': '54', 'type': 'string', 'children': [], 'value': '"error: password store not found at \'%s\'"'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '56', 'type': 'keyword_argument', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '58', 'type': 'True', 'children': []}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'assignment', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'is_encrypted'}; {'id': '69', 'type': 'call', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': '_gpg'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'is_encrypted'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '75', 'type': 'if_statement', 'children': ['76', '77', '87']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'is_encrypted'}; {'id': '77', 'type': 'block', 'children': ['78']}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'original'}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': '_gpg'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'decrypt'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '87', 'type': 'else_clause', 'children': ['88']}; {'id': '88', 'type': 'block', 'children': ['89']}; {'id': '89', 'type': 'expression_statement', 'children': ['90']}; {'id': '90', 'type': 'assignment', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'original'}; {'id': '92', 'type': 'call', 'children': ['93', '100']}; {'id': '93', 'type': 'attribute', 'children': ['94', '99']}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '96', 'type': 'argument_list', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '98', 'type': 'string', 'children': [], 'value': '"rb"'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'read'}; {'id': '100', 'type': 'argument_list', 'children': []}; {'id': '101', 'type': 'if_statement', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'is_encrypted'}; {'id': '103', 'type': 'block', 'children': ['104', '115']}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'assignment', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'recipient'}; {'id': '107', 'type': 'call', 'children': ['108', '113']}; {'id': '108', 'type': 'attribute', 'children': ['109', '112']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'string', 'children': [], 'value': '"PW_GPG_RECIPIENT"'}; {'id': '115', 'type': 'if_statement', 'children': ['116', '118']}; {'id': '116', 'type': 'not_operator', 'children': ['117']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'recipient'}; {'id': '118', 'type': 'block', 'children': ['119', '126']}; {'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': 'click'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '124', 'type': 'argument_list', 'children': ['125']}; {'id': '125', 'type': 'string', 'children': [], 'value': '"error: no recipient set in PW_GPG_RECIPIENT environment variables"'}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': '_gpg'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'unencrypted_ext'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'assignment', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '145', 'type': 'call', 'children': ['146', '149']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'edit'}; {'id': '149', 'type': 'argument_list', 'children': ['150', '156', '159', '162']}; {'id': '150', 'type': 'call', 'children': ['151', '154']}; {'id': '151', 'type': 'attribute', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'original'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'decode'}; {'id': '154', 'type': 'argument_list', 'children': ['155']}; {'id': '155', 'type': 'string', 'children': [], 'value': '"utf-8"'}; {'id': '156', 'type': 'keyword_argument', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'editor'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'editor'}; {'id': '159', 'type': 'keyword_argument', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'require_save'}; {'id': '161', 'type': 'True', 'children': []}; {'id': '162', 'type': 'keyword_argument', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'extension'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '165', 'type': 'if_statement', 'children': ['166', '169']}; {'id': '166', 'type': 'comparison_operator', 'children': ['167', '168'], 'value': 'is'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '168', 'type': 'None', 'children': []}; {'id': '169', 'type': 'block', 'children': ['170', '177']}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'call', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'string', 'children': [], 'value': '"not modified"'}; {'id': '177', 'type': 'return_statement', 'children': []}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'assignment', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '181', 'type': 'call', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'encode'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'string', 'children': [], 'value': '"utf-8"'}; {'id': '187', 'type': 'if_statement', 'children': ['188', '190']}; {'id': '188', 'type': 'not_operator', 'children': ['189']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'is_encrypted'}; {'id': '190', 'type': 'block', 'children': ['191', '210']}; {'id': '191', 'type': 'with_statement', 'children': ['192', '202']}; {'id': '192', 'type': 'with_clause', 'children': ['193']}; {'id': '193', 'type': 'with_item', 'children': ['194']}; {'id': '194', 'type': 'as_pattern', 'children': ['195', '200']}; {'id': '195', 'type': 'call', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '197', 'type': 'argument_list', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '199', 'type': 'string', 'children': [], 'value': '"wb"'}; {'id': '200', 'type': 'as_pattern_target', 'children': ['201']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'fp'}; {'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': 'fp'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '208', 'type': 'argument_list', 'children': ['209']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'modified'}; {'id': '210', 'type': 'return_statement', 'children': []}; {'id': '211', 'type': 'expression_statement', 'children': ['212']}; {'id': '212', 'type': 'call', 'children': ['213', '216']}; {'id': '213', 'type': 'attribute', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': '_gpg'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'encrypt'}; {'id': '216', 'type': 'argument_list', 'children': ['217', '220', '223']}; {'id': '217', 'type': 'keyword_argument', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'recipient'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'recipient'}; {'id': '220', 'type': 'keyword_argument', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'dest_path'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '223', 'type': 'keyword_argument', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'modified'}
launch editor with decrypted password database
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '18']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_json'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9', '12', '15']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'space'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'default_parameter', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'rel_path'}; {'id': '11', 'type': 'None', 'children': []}; {'id': '12', 'type': 'default_parameter', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '14', 'type': 'None', 'children': []}; {'id': '15', 'type': 'default_parameter', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'get_all'}; {'id': '17', 'type': 'None', 'children': []}; {'id': '18', 'type': 'block', 'children': ['19', '37', '45', '57', '82', '146']}; {'id': '19', 'type': 'if_statement', 'children': ['20', '29']}; {'id': '20', 'type': 'boolean_operator', 'children': ['21', '24'], 'value': 'and'}; {'id': '21', 'type': 'comparison_operator', 'children': ['22', '23'], 'value': 'is'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'space'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'comparison_operator', 'children': ['25', '26'], 'value': 'not'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '26', 'type': 'tuple', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'Space'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'Event'}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'raise_statement', 'children': ['31']}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'concatenated_string', 'children': ['35', '36']}; {'id': '35', 'type': 'string', 'children': [], 'value': "'In general, `API._get_json` should always '"}; {'id': '36', 'type': 'string', 'children': [], 'value': "'be called with a `space` argument.'"}; {'id': '37', 'type': 'if_statement', 'children': ['38', '40']}; {'id': '38', 'type': 'not_operator', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '44', 'type': 'dictionary', 'children': []}; {'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': 'extra_params'}; {'id': '49', 'type': 'string', 'children': [], 'value': "'page'"}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '54', 'type': 'argument_list', 'children': ['55', '56']}; {'id': '55', 'type': 'string', 'children': [], 'value': "'page'"}; {'id': '56', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'string', 'children': [], 'value': "'{0}/{1}/{2}.json?{3}'"}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '64', 'type': 'argument_list', 'children': ['65', '68', '71', '76']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'settings'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'API_ROOT_PATH'}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'settings'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'API_VERSION'}; {'id': '71', 'type': 'boolean_operator', 'children': ['72', '73'], 'value': 'or'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'rel_path'}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'rel_path'}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'urllib'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'urlencode'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '82', 'type': 'if_statement', 'children': ['83', '92', '101']}; {'id': '83', 'type': 'boolean_operator', 'children': ['84', '87'], 'value': 'and'}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'cache_responses'}; {'id': '87', 'type': 'comparison_operator', 'children': ['88', '89'], 'value': 'in'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'cache'}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'assignment', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '96', 'type': 'subscript', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'cache'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '101', 'type': 'else_clause', 'children': ['102']}; {'id': '102', 'type': 'block', 'children': ['103', '117', '133']}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '106', 'type': 'dictionary', 'children': ['107', '112']}; {'id': '107', 'type': 'pair', 'children': ['108', '109']}; {'id': '108', 'type': 'string', 'children': [], 'value': "'X-Api-Key'"}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '112', 'type': 'pair', 'children': ['113', '114']}; {'id': '113', 'type': 'string', 'children': [], 'value': "'X-Api-Secret'"}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'secret'}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'assignment', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '120', 'type': 'call', 'children': ['121', '126']}; {'id': '121', 'type': 'attribute', 'children': ['122', '125']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '126', 'type': 'argument_list', 'children': ['127', '130']}; {'id': '127', 'type': 'keyword_argument', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '130', 'type': 'keyword_argument', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '133', 'type': 'if_statement', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'cache_responses'}; {'id': '137', 'type': 'block', 'children': ['138']}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '145']}; {'id': '140', 'type': 'subscript', 'children': ['141', '144']}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'cache'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '146', 'type': 'if_statement', 'children': ['147', '152', '253', '262']}; {'id': '147', 'type': 'comparison_operator', 'children': ['148', '151'], 'value': '=='}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'status_code'}; {'id': '151', 'type': 'integer', 'children': [], 'value': '200'}; {'id': '152', 'type': 'block', 'children': ['153', '157', '165', '200', '210', '251']}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '156', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'json_response'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '164', 'type': 'argument_list', 'children': []}; {'id': '165', 'type': 'for_statement', 'children': ['166', '167', '168']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'json_response'}; {'id': '168', 'type': 'block', 'children': ['169', '178', '184', '193']}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'assignment', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '172', 'type': 'call', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'keyword_argument', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'assignment', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'api'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '184', 'type': 'if_statement', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'space'}; {'id': '186', 'type': 'block', 'children': ['187']}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'space'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'space'}; {'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': 'results'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '198', 'type': 'argument_list', 'children': ['199']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '200', 'type': 'expression_statement', 'children': ['201']}; {'id': '201', 'type': 'assignment', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'per_page'}; {'id': '203', 'type': 'call', 'children': ['204', '207']}; {'id': '204', 'type': 'attribute', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '207', 'type': 'argument_list', 'children': ['208', '209']}; {'id': '208', 'type': 'string', 'children': [], 'value': "'per_page'"}; {'id': '209', 'type': 'None', 'children': []}; {'id': '210', 'type': 'if_statement', 'children': ['211', '227']}; {'id': '211', 'type': '()', 'children': ['212']}; {'id': '212', 'type': 'boolean_operator', 'children': ['213', '221'], 'value': 'and'}; {'id': '213', 'type': 'boolean_operator', 'children': ['214', '217'], 'value': 'and'}; {'id': '214', 'type': 'boolean_operator', 'children': ['215', '216'], 'value': 'and'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'get_all'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'per_page'}; {'id': '217', 'type': 'call', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'json_response'}; {'id': '221', 'type': 'comparison_operator', 'children': ['222', '223'], 'value': '=='}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'per_page'}; {'id': '223', 'type': 'call', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '225', 'type': 'argument_list', 'children': ['226']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'json_response'}; {'id': '227', 'type': 'block', 'children': ['228', '234']}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'augmented_assignment', 'children': ['230', '233'], 'value': '+='}; {'id': '230', 'type': 'subscript', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '232', 'type': 'string', 'children': [], 'value': "'page'"}; {'id': '233', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'assignment', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '237', 'type': 'binary_operator', 'children': ['238', '239'], 'value': '+'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '239', 'type': 'call', 'children': ['240', '243']}; {'id': '240', 'type': 'attribute', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': '_get_json'}; {'id': '243', 'type': 'argument_list', 'children': ['244', '245', '246', '247', '248']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'space'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'rel_path'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'extra_params'}; {'id': '248', 'type': 'keyword_argument', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'get_all'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'get_all'}; {'id': '251', 'type': 'return_statement', 'children': ['252']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '253', 'type': 'elif_clause', 'children': ['254', '259']}; {'id': '254', 'type': 'comparison_operator', 'children': ['255', '258'], 'value': '=='}; {'id': '255', 'type': 'attribute', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'status_code'}; {'id': '258', 'type': 'integer', 'children': [], 'value': '204'}; {'id': '259', 'type': 'block', 'children': ['260']}; {'id': '260', 'type': 'return_statement', 'children': ['261']}; {'id': '261', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '262', 'type': 'else_clause', 'children': ['263']}; {'id': '263', 'type': 'block', 'children': ['264']}; {'id': '264', 'type': 'raise_statement', 'children': ['265']}; {'id': '265', 'type': 'call', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '267', 'type': 'argument_list', 'children': ['268']}; {'id': '268', 'type': 'call', 'children': ['269', '272']}; {'id': '269', 'type': 'attribute', 'children': ['270', '271']}; {'id': '270', 'type': 'string', 'children': [], 'value': '\'Code {0} returned from `{1}`. Response text: "{2}".\''}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '272', 'type': 'argument_list', 'children': ['273', '276', '277']}; {'id': '273', 'type': 'attribute', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'status_code'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '277', 'type': 'attribute', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'text'}
Base level method for fetching data from the API
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'handle_cmd'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '6', 'type': 'block', 'children': ['7', '15', '19', '121', '132', '154', '161', '213']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '14', 'type': 'argument_list', 'children': []}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '18', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '19', 'type': 'for_statement', 'children': ['20', '21', '26']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '25', 'type': 'argument_list', 'children': []}; {'id': '26', 'type': 'block', 'children': ['27', '109']}; {'id': '27', 'type': 'if_statement', 'children': ['28', '31', '61']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '31', 'type': 'ERROR', 'children': ['32', '40', '41', '42', '50', '56']}; {'id': '32', 'type': 'ERROR', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'break'}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '41', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '42', 'type': 'ERROR', 'children': ['43', '48', '49']}; {'id': '43', 'type': 'not_operator', 'children': ['44']}; {'id': '44', 'type': 'call', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'cur_cmd'}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'string', 'children': [], 'value': '"_"'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '56', 'type': 'comparison_operator', 'children': ['57', '58'], 'value': 'in'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'cur_cmd'}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': '_cmd_methods'}; {'id': '61', 'type': 'block', 'children': ['62', '70', '99', '108']}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'assignment', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'argc'}; {'id': '65', 'type': 'subscript', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': '_cmd_argc'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'cur_cmd'}; {'id': '70', 'type': 'if_statement', 'children': ['71', '81']}; {'id': '71', 'type': 'boolean_operator', 'children': ['72', '75'], 'value': 'and'}; {'id': '72', 'type': 'comparison_operator', 'children': ['73', '74'], 'value': 'is'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'argc'}; {'id': '74', 'type': 'None', 'children': []}; {'id': '75', 'type': 'comparison_operator', 'children': ['76', '80'], 'value': '!='}; {'id': '76', 'type': 'call', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '78', 'type': 'argument_list', 'children': ['79']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'argc'}; {'id': '81', 'type': 'block', 'children': ['82', '98']}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'call', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '85', 'type': 'argument_list', 'children': ['86', '87', '93', '94']}; {'id': '86', 'type': 'string', 'children': [], 'value': "'command {0} expects {1} argument(s), got {2}'"}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'string', 'children': [], 'value': '" "'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'argc'}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '98', 'type': 'return_statement', 'children': []}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'call', 'children': ['101', '106']}; {'id': '101', 'type': 'subscript', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': '_cmd_methods'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'cur_cmd'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '108', 'type': 'return_statement', 'children': []}; {'id': '109', 'type': 'expression_statement', 'children': ['110']}; {'id': '110', 'type': 'call', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'insert'}; {'id': '114', 'type': 'argument_list', 'children': ['115', '116']}; {'id': '115', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'segments'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '120', 'type': 'argument_list', 'children': []}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '124', 'type': 'binary_operator', 'children': ['125', '131'], 'value': '+'}; {'id': '125', 'type': 'call', 'children': ['126', '129']}; {'id': '126', 'type': 'attribute', 'children': ['127', '128']}; {'id': '127', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '129', 'type': 'argument_list', 'children': ['130']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '131', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'assignment', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '135', 'type': 'call', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '137', 'type': 'argument_list', 'children': ['138', '147']}; {'id': '138', 'type': 'lambda', 'children': ['139', '141']}; {'id': '139', 'type': 'lambda_parameters', 'children': ['140']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '141', 'type': 'call', 'children': ['142', '145']}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '145', 'type': 'argument_list', 'children': ['146']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'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': 'self'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': '_cmd_methods'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '153', 'type': 'argument_list', 'children': []}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '157', 'type': 'call', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '159', 'type': 'argument_list', 'children': ['160']}; {'id': '160', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '161', 'type': 'for_statement', 'children': ['162', '163', '164']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '164', 'type': 'block', 'children': ['165', '177', '188', '206']}; {'id': '165', 'type': 'if_statement', 'children': ['166', '175']}; {'id': '166', 'type': 'comparison_operator', 'children': ['167', '171'], 'value': '<='}; {'id': '167', 'type': 'call', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '169', 'type': 'argument_list', 'children': ['170']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '171', 'type': 'call', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '175', 'type': 'block', 'children': ['176']}; {'id': '176', 'type': 'continue_statement', 'children': []}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '180', 'type': 'subscript', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '182', 'type': 'slice', 'children': ['183', '187']}; {'id': '183', 'type': 'call', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '187', 'type': 'colon', 'children': []}; {'id': '188', 'type': 'if_statement', 'children': ['189', '192']}; {'id': '189', 'type': 'comparison_operator', 'children': ['190', '191'], 'value': 'in'}; {'id': '190', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '192', 'type': 'block', 'children': ['193']}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '196', 'type': 'subscript', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '198', 'type': 'slice', 'children': ['199', '200']}; {'id': '199', 'type': 'colon', 'children': []}; {'id': '200', 'type': 'call', 'children': ['201', '204']}; {'id': '201', 'type': 'attribute', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '204', 'type': 'argument_list', 'children': ['205']}; {'id': '205', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '211', 'type': 'argument_list', 'children': ['212']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '213', 'type': 'if_statement', 'children': ['214', '218', '240']}; {'id': '214', 'type': 'call', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '216', 'type': 'argument_list', 'children': ['217']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '218', 'type': 'block', 'children': ['219', '230']}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'call', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '222', 'type': 'argument_list', 'children': ['223', '224']}; {'id': '223', 'type': 'string', 'children': [], 'value': '\'command "{0}" needs more arguments:\''}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '228', 'type': 'argument_list', 'children': ['229']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '230', 'type': 'for_statement', 'children': ['231', '232', '233']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'candidates'}; {'id': '233', 'type': 'block', 'children': ['234']}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '237', 'type': 'argument_list', 'children': ['238', '239']}; {'id': '238', 'type': 'string', 'children': [], 'value': "' {0}'"}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '240', 'type': 'else_clause', 'children': ['241']}; {'id': '241', 'type': 'block', 'children': ['242']}; {'id': '242', 'type': 'expression_statement', 'children': ['243']}; {'id': '243', 'type': 'call', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '245', 'type': 'argument_list', 'children': ['246', '249']}; {'id': '246', 'type': 'binary_operator', 'children': ['247', '248'], 'value': '+'}; {'id': '247', 'type': 'string', 'children': [], 'value': '\'command "{0}" invalid; type \''}; {'id': '248', 'type': 'string', 'children': [], 'value': "'help or use <TAB> for a list of commands'"}; {'id': '249', 'type': 'call', 'children': ['250', '253']}; {'id': '250', 'type': 'attribute', 'children': ['251', '252']}; {'id': '251', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '253', 'type': 'argument_list', 'children': ['254']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'args'}
Handles a single server command.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'by_user'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '18', '25']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'client'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'Client'}; {'id': '11', 'type': 'argument_list', 'children': []}; {'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': 'client'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'prepare_connection'}; {'id': '17', 'type': 'argument_list', 'children': []}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'audit_api'}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'API'}; {'id': '23', 'type': 'argument_list', 'children': ['24']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'client'}; {'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': 'CLI'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'parse_membership'}; {'id': '30', 'type': 'argument_list', 'children': ['31', '32']}; {'id': '31', 'type': 'string', 'children': [], 'value': "'Groups by User'"}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'audit_api'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'by_user'}; {'id': '36', 'type': 'argument_list', 'children': []}
Display LDAP group membership sorted by user.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_sortkey'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '5', 'type': 'block', 'children': ['6', '20']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'wfs'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'WebFeatureService'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '17']}; {'id': '12', 'type': 'keyword_argument', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'bcdata'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'OWS_URL'}; {'id': '17', 'type': 'keyword_argument', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '19', 'type': 'string', 'children': [], 'value': '"2.0.0"'}; {'id': '20', 'type': 'return_statement', 'children': ['21']}; {'id': '21', 'type': 'subscript', 'children': ['22', '39']}; {'id': '22', 'type': 'call', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '38']}; {'id': '26', 'type': 'attribute', 'children': ['27', '37']}; {'id': '27', 'type': 'subscript', 'children': ['28', '36']}; {'id': '28', 'type': 'call', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'wfs'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'get_schema'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'binary_operator', 'children': ['34', '35'], 'value': '+'}; {'id': '34', 'type': 'string', 'children': [], 'value': '"pub:"'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'table'}; {'id': '36', 'type': 'string', 'children': [], 'value': '"properties"'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '38', 'type': 'argument_list', 'children': []}; {'id': '39', 'type': 'integer', 'children': [], 'value': '0'}
Get a field to sort by
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'find_new_posts_and_pages'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '5', 'type': 'block', 'children': ['6', '12']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'Q'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'Query'}; {'id': '11', 'type': 'argument_list', 'children': []}; {'id': '12', 'type': 'for_statement', 'children': ['13', '17', '25']}; {'id': '13', 'type': 'pattern_list', 'children': ['14', '15', '16']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'root'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'walk'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'subscript', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'CONFIG'}; {'id': '24', 'type': 'string', 'children': [], 'value': "'content_root'"}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'for_statement', 'children': ['27', '28', '45']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'list_comprehension', 'children': ['32', '33', '36']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '33', 'type': 'for_in_clause', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'files'}; {'id': '36', 'type': 'if_clause', 'children': ['37']}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'endswith'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'tuple', 'children': ['43', '44']}; {'id': '43', 'type': 'string', 'children': [], 'value': "'md'"}; {'id': '44', 'type': 'string', 'children': [], 'value': "'markdown'"}; {'id': '45', 'type': 'block', 'children': ['46', '58', '77', '91', '99', '161', '172']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'fullpath'}; {'id': '49', 'type': 'call', 'children': ['50', '55']}; {'id': '50', 'type': 'attribute', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'root'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': '_p'}; {'id': '61', 'type': 'call', 'children': ['62', '75']}; {'id': '62', 'type': 'attribute', 'children': ['63', '74']}; {'id': '63', 'type': 'subscript', 'children': ['64', '72']}; {'id': '64', 'type': 'call', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'fullpath'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'subscript', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'CONFIG'}; {'id': '71', 'type': 'string', 'children': [], 'value': "'content_root'"}; {'id': '72', 'type': 'unary_operator', 'children': ['73'], 'value': '-'}; {'id': '73', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'lstrip'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'new_mtime'}; {'id': '80', 'type': 'call', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'call', 'children': ['84', '89']}; {'id': '84', 'type': 'attribute', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'getmtime'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'fullpath'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '96']}; {'id': '93', 'type': 'pattern_list', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '96', 'type': 'expression_list', 'children': ['97', '98']}; {'id': '97', 'type': 'None', 'children': []}; {'id': '98', 'type': 'None', 'children': []}; {'id': '99', 'type': 'for_statement', 'children': ['100', '101', '104']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'collection'}; {'id': '101', 'type': 'list', 'children': ['102', '103'], 'value': "['posts', 'pages']"}; {'id': '102', 'type': 'string', 'children': [], 'value': "'posts'"}; {'id': '103', 'type': 'string', 'children': [], 'value': "'pages'"}; {'id': '104', 'type': 'block', 'children': ['105', '120']}; {'id': '105', 'type': 'expression_statement', 'children': ['106']}; {'id': '106', 'type': 'assignment', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '108', 'type': 'call', 'children': ['109', '114']}; {'id': '109', 'type': 'attribute', 'children': ['110', '113']}; {'id': '110', 'type': 'subscript', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'collection'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '114', 'type': 'argument_list', 'children': ['115']}; {'id': '115', 'type': 'comparison_operator', 'children': ['116', '119'], 'value': '=='}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'Q'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': '_p'}; {'id': '120', 'type': 'if_statement', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '122', 'type': 'block', 'children': ['123', '160']}; {'id': '123', 'type': 'if_statement', 'children': ['124', '129']}; {'id': '124', 'type': 'comparison_operator', 'children': ['125', '126'], 'value': '>'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'new_mtime'}; {'id': '126', 'type': 'subscript', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'mtime'"}; {'id': '129', 'type': 'block', 'children': ['130', '148']}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'call', 'children': ['132', '137']}; {'id': '132', 'type': 'attribute', 'children': ['133', '136']}; {'id': '133', 'type': 'subscript', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'collection'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '137', 'type': 'argument_list', 'children': ['138', '142']}; {'id': '138', 'type': 'dictionary', 'children': ['139']}; {'id': '139', 'type': 'pair', 'children': ['140', '141']}; {'id': '140', 'type': 'string', 'children': [], 'value': "'mtime'"}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'new_mtime'}; {'id': '142', 'type': 'keyword_argument', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'doc_ids'}; {'id': '144', 'type': 'list', 'children': ['145'], 'value': '[item.doc_id]'}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '151', 'type': 'call', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'Entry'}; {'id': '153', 'type': 'argument_list', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'fullpath'}; {'id': '155', 'type': 'keyword_argument', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '160', 'type': 'break_statement', 'children': []}; {'id': '161', 'type': 'if_statement', 'children': ['162', '164']}; {'id': '162', 'type': 'not_operator', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '164', 'type': 'block', 'children': ['165']}; {'id': '165', 'type': 'expression_statement', 'children': ['166']}; {'id': '166', 'type': 'assignment', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '168', 'type': 'call', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'Entry'}; {'id': '170', 'type': 'argument_list', 'children': ['171']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'fullpath'}; {'id': '172', 'type': 'if_statement', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '174', 'type': 'block', 'children': ['175']}; {'id': '175', 'type': 'expression_statement', 'children': ['176']}; {'id': '176', 'type': 'yield', 'children': ['177']}; {'id': '177', 'type': 'expression_list', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '179', 'type': 'attribute', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'id'}
Walk content dir, put each post and page in the database
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_locations'}; {'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': 'filter_to_my_group'}; {'id': '7', 'type': 'False', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '19', '23', '60', '64', '199']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': '_post'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '18']}; {'id': '17', 'type': 'string', 'children': [], 'value': "'general-retrievelocations'"}; {'id': '18', 'type': 'string', 'children': [], 'value': "'locations'"}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '22', 'type': 'dictionary', 'children': []}; {'id': '23', 'type': 'if_statement', 'children': ['24', '27']}; {'id': '24', 'type': 'subscript', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '26', 'type': 'string', 'children': [], 'value': "'groupinfo'"}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'for_statement', 'children': ['29', '30', '33']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '30', 'type': 'subscript', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '32', 'type': 'string', 'children': [], 'value': "'groupinfo'"}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'assignment', 'children': ['36', '41']}; {'id': '36', 'type': 'subscript', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '38', 'type': 'subscript', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '40', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'Group'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '52']}; {'id': '44', 'type': 'keyword_argument', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '52', 'type': 'keyword_argument', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'inventory_id'}; {'id': '54', 'type': 'call', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'final_resp'}; {'id': '63', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '64', 'type': 'if_statement', 'children': ['65', '68']}; {'id': '65', 'type': 'subscript', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '67', 'type': 'string', 'children': [], 'value': "'data'"}; {'id': '68', 'type': 'block', 'children': ['69', '89']}; {'id': '69', 'type': 'if_statement', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'filter_to_my_group'}; {'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': 'resp'}; {'id': '76', 'type': 'string', 'children': [], 'value': "'data'"}; {'id': '77', 'type': 'dictionary', 'children': ['78']}; {'id': '78', 'type': 'pair', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'groupid'}; {'id': '82', 'type': 'subscript', 'children': ['83', '86']}; {'id': '83', 'type': 'subscript', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '85', 'type': 'string', 'children': [], 'value': "'data'"}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'groupid'}; {'id': '89', 'type': 'for_statement', 'children': ['90', '93', '100']}; {'id': '90', 'type': 'pattern_list', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'groupid'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '93', 'type': 'call', 'children': ['94', '99']}; {'id': '94', 'type': 'attribute', 'children': ['95', '98']}; {'id': '95', 'type': 'subscript', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'resp'}; {'id': '97', 'type': 'string', 'children': [], 'value': "'data'"}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '99', 'type': 'argument_list', 'children': []}; {'id': '100', 'type': 'block', 'children': ['101', '130', '145']}; {'id': '101', 'type': 'if_statement', 'children': ['102', '108']}; {'id': '102', 'type': 'comparison_operator', 'children': ['103', '107'], 'value': 'is'}; {'id': '103', 'type': 'call', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '108', 'type': 'block', 'children': ['109', '123']}; {'id': '109', 'type': 'expression_statement', 'children': ['110']}; {'id': '110', 'type': 'assignment', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '112', 'type': 'list_comprehension', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'loc'}; {'id': '114', 'type': 'for_in_clause', 'children': ['115', '118']}; {'id': '115', 'type': 'pattern_list', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'loc'}; {'id': '118', 'type': 'call', 'children': ['119', '122']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '122', 'type': 'argument_list', 'children': []}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'flatten_list'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '130', 'type': 'if_statement', 'children': ['131', '137']}; {'id': '131', 'type': 'comparison_operator', 'children': ['132', '136'], 'value': 'is'}; {'id': '132', 'type': 'call', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '137', 'type': 'block', 'children': ['138']}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '141', 'type': 'call', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'flatten_list'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '145', 'type': 'for_statement', 'children': ['146', '147', '148']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'sublocation'}; {'id': '148', 'type': 'block', 'children': ['149', '155']}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'assignment', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '152', 'type': 'subscript', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'groups'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'groupid'}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'final_resp'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'call', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'Location'}; {'id': '163', 'type': 'argument_list', 'children': ['164', '172', '180', '188', '191']}; {'id': '164', 'type': 'keyword_argument', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '170', 'type': 'argument_list', 'children': ['171']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '172', 'type': 'keyword_argument', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'inventory_id'}; {'id': '174', 'type': 'call', 'children': ['175', '178']}; {'id': '175', 'type': 'attribute', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '178', 'type': 'argument_list', 'children': ['179']}; {'id': '179', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '180', 'type': 'keyword_argument', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '182', 'type': 'call', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '186', 'type': 'argument_list', 'children': ['187']}; {'id': '187', 'type': 'string', 'children': [], 'value': "'parent'"}; {'id': '188', 'type': 'keyword_argument', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '191', 'type': 'keyword_argument', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'barcode'}; {'id': '193', 'type': 'call', 'children': ['194', '197']}; {'id': '194', 'type': 'attribute', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '197', 'type': 'argument_list', 'children': ['198']}; {'id': '198', 'type': 'string', 'children': [], 'value': "'barcode'"}; {'id': '199', 'type': 'return_statement', 'children': ['200']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'final_resp'}
Retrieve Locations listed in ChemInventory
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '14']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_properties'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'p_selectors'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'p_parents'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'p_children'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'scope'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'media'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'c_lineno'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'c_property'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'c_codestr'}; {'id': '14', 'type': 'block', 'children': ['15', '35', '56', '64', '81']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '20']}; {'id': '17', 'type': 'pattern_list', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '20', 'type': 'subscript', 'children': ['21', '32']}; {'id': '21', 'type': '()', 'children': ['22']}; {'id': '22', 'type': 'binary_operator', 'children': ['23', '30'], 'value': '+'}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': '_prop_split_re'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '27', 'type': 'argument_list', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'c_property'}; {'id': '29', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '30', 'type': 'list', 'children': ['31'], 'value': '[None]'}; {'id': '31', 'type': 'None', 'children': []}; {'id': '32', 'type': 'slice', 'children': ['33', '34']}; {'id': '33', 'type': 'colon', 'children': []}; {'id': '34', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '35', 'type': 'try_statement', 'children': ['36', '49']}; {'id': '36', 'type': 'block', 'children': ['37']}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'is_var'}; {'id': '40', 'type': '()', 'children': ['41']}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '48'], 'value': '=='}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'c_property'}; {'id': '44', 'type': 'call', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '48', 'type': 'string', 'children': [], 'value': "'='"}; {'id': '49', 'type': 'except_clause', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'is_var'}; {'id': '55', 'type': 'False', 'children': []}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'assignment', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '59', 'type': 'call', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '63', 'type': 'argument_list', 'children': []}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'do_glob_math'}; {'id': '71', 'type': 'argument_list', 'children': ['72', '73', '76', '79', '80']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '73', 'type': 'subscript', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '76', 'type': 'subscript', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '80', 'type': 'True', 'children': []}; {'id': '81', 'type': 'if_statement', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '83', 'type': 'block', 'children': ['84', '111', '120']}; {'id': '84', 'type': 'if_statement', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '86', 'type': 'block', 'children': ['87', '95']}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '94', 'type': 'argument_list', 'children': []}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'assignment', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'calculate'}; {'id': '102', 'type': 'argument_list', 'children': ['103', '104', '107', '110']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '104', 'type': 'subscript', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '107', 'type': 'subscript', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'assignment', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '114', 'type': 'binary_operator', 'children': ['115', '119'], 'value': '+'}; {'id': '115', 'type': '()', 'children': ['116']}; {'id': '116', 'type': 'boolean_operator', 'children': ['117', '118'], 'value': 'or'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'scope'}; {'id': '118', 'type': 'string', 'children': [], 'value': "''"}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '120', 'type': 'if_statement', 'children': ['121', '133', '259']}; {'id': '121', 'type': 'boolean_operator', 'children': ['122', '123'], 'value': 'or'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'is_var'}; {'id': '123', 'type': 'boolean_operator', 'children': ['124', '130'], 'value': 'and'}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'string', 'children': [], 'value': "'$'"}; {'id': '130', 'type': 'comparison_operator', 'children': ['131', '132'], 'value': 'is'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '132', 'type': 'None', 'children': []}; {'id': '133', 'type': 'block', 'children': ['134', '246']}; {'id': '134', 'type': 'if_statement', 'children': ['135', '140', '179']}; {'id': '135', 'type': 'call', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '137', 'type': 'argument_list', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'basestring'}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'if_statement', 'children': ['142', '145']}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '144'], 'value': 'in'}; {'id': '143', 'type': 'string', 'children': [], 'value': "'!default'"}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'if_statement', 'children': ['147', '152', '157']}; {'id': '147', 'type': 'comparison_operator', 'children': ['148', '149'], 'value': 'in'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '149', 'type': 'subscript', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '152', 'type': 'block', 'children': ['153']}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '156', 'type': 'None', 'children': []}; {'id': '157', 'type': 'else_clause', 'children': ['158']}; {'id': '158', 'type': 'block', 'children': ['159']}; {'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', '178']}; {'id': '163', 'type': 'attribute', 'children': ['164', '177']}; {'id': '164', 'type': 'call', 'children': ['165', '174']}; {'id': '165', 'type': 'attribute', 'children': ['166', '173']}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '170', 'type': 'argument_list', 'children': ['171', '172']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'!default'"}; {'id': '172', 'type': 'string', 'children': [], 'value': "''"}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '174', 'type': 'argument_list', 'children': ['175', '176']}; {'id': '175', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '176', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '178', 'type': 'argument_list', 'children': []}; {'id': '179', 'type': 'elif_clause', 'children': ['180', '185']}; {'id': '180', 'type': 'call', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '182', 'type': 'argument_list', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'ListValue'}; {'id': '185', 'type': 'block', 'children': ['186', '193']}; {'id': '186', 'type': 'expression_statement', 'children': ['187']}; {'id': '187', 'type': 'assignment', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '189', 'type': 'call', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'ListValue'}; {'id': '191', 'type': 'argument_list', 'children': ['192']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '193', 'type': 'for_statement', 'children': ['194', '197', '204']}; {'id': '194', 'type': 'pattern_list', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '197', 'type': 'call', 'children': ['198', '203']}; {'id': '198', 'type': 'attribute', 'children': ['199', '202']}; {'id': '199', 'type': 'attribute', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '203', 'type': 'argument_list', 'children': []}; {'id': '204', 'type': 'block', 'children': ['205']}; {'id': '205', 'type': 'if_statement', 'children': ['206', '209']}; {'id': '206', 'type': 'comparison_operator', 'children': ['207', '208'], 'value': '=='}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '208', 'type': 'string', 'children': [], 'value': "'!default'"}; {'id': '209', 'type': 'block', 'children': ['210', '245']}; {'id': '210', 'type': 'if_statement', 'children': ['211', '216', '221']}; {'id': '211', 'type': 'comparison_operator', 'children': ['212', '213'], 'value': 'in'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '213', 'type': 'subscript', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '216', 'type': 'block', 'children': ['217']}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'assignment', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '220', 'type': 'None', 'children': []}; {'id': '221', 'type': 'else_clause', 'children': ['222']}; {'id': '222', 'type': 'block', 'children': ['223', '229']}; {'id': '223', 'type': 'delete_statement', 'children': ['224']}; {'id': '224', 'type': 'subscript', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '229', 'type': 'expression_statement', 'children': ['230']}; {'id': '230', 'type': 'assignment', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '232', 'type': 'conditional_expression', 'children': ['233', '238', '244'], 'value': 'if'}; {'id': '233', 'type': 'call', 'children': ['234', '237']}; {'id': '234', 'type': 'attribute', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'first'}; {'id': '237', 'type': 'argument_list', 'children': []}; {'id': '238', 'type': 'comparison_operator', 'children': ['239', '243'], 'value': '=='}; {'id': '239', 'type': 'call', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '241', 'type': 'argument_list', 'children': ['242']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '243', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '245', 'type': 'break_statement', 'children': []}; {'id': '246', 'type': 'if_statement', 'children': ['247', '250']}; {'id': '247', 'type': 'comparison_operator', 'children': ['248', '249'], 'value': 'is'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '249', 'type': 'None', 'children': []}; {'id': '250', 'type': 'block', 'children': ['251']}; {'id': '251', 'type': 'expression_statement', 'children': ['252']}; {'id': '252', 'type': 'assignment', 'children': ['253', '258']}; {'id': '253', 'type': 'subscript', 'children': ['254', '257']}; {'id': '254', 'type': 'subscript', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '259', 'type': 'else_clause', 'children': ['260']}; {'id': '260', 'type': 'block', 'children': ['261', '278']}; {'id': '261', 'type': 'expression_statement', 'children': ['262']}; {'id': '262', 'type': 'assignment', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '264', 'type': 'call', 'children': ['265', '268']}; {'id': '265', 'type': 'attribute', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'apply_vars'}; {'id': '268', 'type': 'argument_list', 'children': ['269', '270', '273', '276', '277']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '270', 'type': 'subscript', 'children': ['271', '272']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '273', 'type': 'subscript', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '277', 'type': 'True', 'children': []}; {'id': '278', 'type': 'expression_statement', 'children': ['279']}; {'id': '279', 'type': 'call', 'children': ['280', '285']}; {'id': '280', 'type': 'attribute', 'children': ['281', '284']}; {'id': '281', 'type': 'subscript', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'PROPERTIES'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '285', 'type': 'argument_list', 'children': ['286']}; {'id': '286', 'type': 'tuple', 'children': ['287', '288', '289']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'c_lineno'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': '_prop'}; {'id': '289', 'type': 'conditional_expression', 'children': ['290', '294', '297'], 'value': 'if'}; {'id': '290', 'type': 'call', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'to_str'}; {'id': '292', 'type': 'argument_list', 'children': ['293']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '294', 'type': 'comparison_operator', 'children': ['295', '296'], 'value': 'is'}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '296', 'type': 'None', 'children': []}; {'id': '297', 'type': 'None', 'children': []}
Implements properties and variables extraction
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'parse_extends'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '87', '91', '95']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '10', '17']}; {'id': '7', 'type': 'pattern_list', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'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': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'block', 'children': ['18']}; {'id': '18', 'type': 'if_statement', 'children': ['19', '22']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '21'], 'value': 'in'}; {'id': '20', 'type': 'string', 'children': [], 'value': "' extends '"}; {'id': '21', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '22', 'type': 'block', 'children': ['23', '35', '44', '50']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '29']}; {'id': '25', 'type': 'pattern_list', 'children': ['26', '27', '28']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '29', 'type': 'call', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'partition'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'string', 'children': [], 'value': "' extends '"}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'parents'}; {'id': '38', 'type': 'call', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '42', 'type': 'argument_list', 'children': ['43']}; {'id': '43', 'type': 'string', 'children': [], 'value': "'&'"}; {'id': '44', 'type': 'delete_statement', 'children': ['45']}; {'id': '45', 'type': 'subscript', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '50', 'type': 'for_statement', 'children': ['51', '52', '53']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'parents'}; {'id': '53', 'type': 'block', 'children': ['54', '62', '72', '83']}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'assignment', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'new_selectors'}; {'id': '57', 'type': 'binary_operator', 'children': ['58', '61'], 'value': '+'}; {'id': '58', 'type': 'binary_operator', 'children': ['59', '60'], 'value': '+'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '60', 'type': 'string', 'children': [], 'value': "' extends '"}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'call', 'children': ['64', '69']}; {'id': '64', 'type': 'attribute', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'setdefault'}; {'id': '69', 'type': 'argument_list', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'new_selectors'}; {'id': '71', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'call', 'children': ['74', '81']}; {'id': '74', 'type': 'attribute', 'children': ['75', '80']}; {'id': '75', 'type': 'subscript', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'new_selectors'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '86', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '90', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'parents_left'}; {'id': '94', 'type': 'True', 'children': []}; {'id': '95', 'type': 'while_statement', 'children': ['96', '101']}; {'id': '96', 'type': 'boolean_operator', 'children': ['97', '98'], 'value': 'and'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'parents_left'}; {'id': '98', 'type': 'comparison_operator', 'children': ['99', '100'], 'value': '<'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '100', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '101', 'type': 'block', 'children': ['102', '106', '110']}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'augmented_assignment', 'children': ['104', '105'], 'value': '+='}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '105', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'parents_left'}; {'id': '109', 'type': 'False', 'children': []}; {'id': '110', 'type': 'for_statement', 'children': ['111', '112', '119']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '112', 'type': 'call', 'children': ['113', '118']}; {'id': '113', 'type': 'attribute', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '118', 'type': 'argument_list', 'children': []}; {'id': '119', 'type': 'block', 'children': ['120', '132']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '126']}; {'id': '122', 'type': 'pattern_list', 'children': ['123', '124', '125']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'partition'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'string', 'children': [], 'value': "' extends '"}; {'id': '132', 'type': 'if_statement', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '134', 'type': 'block', 'children': ['135', '139', '147', '155', '161', '171', '182', '193']}; {'id': '135', 'type': 'expression_statement', 'children': ['136']}; {'id': '136', 'type': 'assignment', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'parents_left'}; {'id': '138', 'type': 'True', 'children': []}; {'id': '139', 'type': 'if_statement', 'children': ['140', '145']}; {'id': '140', 'type': 'comparison_operator', 'children': ['141', '142'], 'value': 'not'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'continue_statement', 'children': []}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'assignment', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '150', 'type': 'subscript', 'children': ['151', '154']}; {'id': '151', 'type': 'attribute', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '155', 'type': 'delete_statement', 'children': ['156']}; {'id': '156', 'type': 'subscript', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': '_selectors'}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'call', 'children': ['163', '168']}; {'id': '163', 'type': 'attribute', 'children': ['164', '167']}; {'id': '164', 'type': 'attribute', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'setdefault'}; {'id': '168', 'type': 'argument_list', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '170', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'call', 'children': ['173', '180']}; {'id': '173', 'type': 'attribute', 'children': ['174', '179']}; {'id': '174', 'type': 'subscript', 'children': ['175', '178']}; {'id': '175', 'type': 'attribute', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '180', 'type': 'argument_list', 'children': ['181']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'assignment', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'parents'}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'link_with_parents'}; {'id': '189', 'type': 'argument_list', 'children': ['190', '191', '192']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'selectors'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '193', 'type': 'if_statement', 'children': ['194', '197', '206']}; {'id': '194', 'type': 'comparison_operator', 'children': ['195', '196'], 'value': 'is'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'parents'}; {'id': '196', 'type': 'None', 'children': []}; {'id': '197', 'type': 'block', 'children': ['198']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'warn'}; {'id': '203', 'type': 'argument_list', 'children': ['204', '205']}; {'id': '204', 'type': 'string', 'children': [], 'value': '"Parent rule not found: %s"'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '206', 'type': 'else_clause', 'children': ['207']}; {'id': '207', 'type': 'block', 'children': ['208', '212', '216', '238']}; {'id': '208', 'type': 'expression_statement', 'children': ['209']}; {'id': '209', 'type': 'assignment', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'new_context'}; {'id': '211', 'type': 'dictionary', 'children': []}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'new_options'}; {'id': '215', 'type': 'dictionary', 'children': []}; {'id': '216', 'type': 'for_statement', 'children': ['217', '218', '219']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'parents'}; {'id': '219', 'type': 'block', 'children': ['220', '229']}; {'id': '220', 'type': 'expression_statement', 'children': ['221']}; {'id': '221', 'type': 'call', 'children': ['222', '225']}; {'id': '222', 'type': 'attribute', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'new_context'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '225', 'type': 'argument_list', 'children': ['226']}; {'id': '226', 'type': 'subscript', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '229', 'type': 'expression_statement', 'children': ['230']}; {'id': '230', 'type': 'call', 'children': ['231', '234']}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'new_options'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '234', 'type': 'argument_list', 'children': ['235']}; {'id': '235', 'type': 'subscript', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'parent'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '238', 'type': 'for_statement', 'children': ['239', '240', '241']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'rules'}; {'id': '241', 'type': 'block', 'children': ['242', '250', '259', '265', '273', '282']}; {'id': '242', 'type': 'expression_statement', 'children': ['243']}; {'id': '243', 'type': 'assignment', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': '_new_context'}; {'id': '245', 'type': 'call', 'children': ['246', '249']}; {'id': '246', 'type': 'attribute', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'new_context'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '249', 'type': 'argument_list', 'children': []}; {'id': '250', 'type': 'expression_statement', 'children': ['251']}; {'id': '251', 'type': 'call', 'children': ['252', '255']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': '_new_context'}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '255', 'type': 'argument_list', 'children': ['256']}; {'id': '256', 'type': 'subscript', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '259', 'type': 'expression_statement', 'children': ['260']}; {'id': '260', 'type': 'assignment', 'children': ['261', '264']}; {'id': '261', 'type': 'subscript', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'CONTEXT'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': '_new_context'}; {'id': '265', 'type': 'expression_statement', 'children': ['266']}; {'id': '266', 'type': 'assignment', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': '_new_options'}; {'id': '268', 'type': 'call', 'children': ['269', '272']}; {'id': '269', 'type': 'attribute', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'new_options'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '272', 'type': 'argument_list', 'children': []}; {'id': '273', 'type': 'expression_statement', 'children': ['274']}; {'id': '274', 'type': 'call', 'children': ['275', '278']}; {'id': '275', 'type': 'attribute', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': '_new_options'}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '278', 'type': 'argument_list', 'children': ['279']}; {'id': '279', 'type': 'subscript', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '282', 'type': 'expression_statement', 'children': ['283']}; {'id': '283', 'type': 'assignment', 'children': ['284', '287']}; {'id': '284', 'type': 'subscript', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'OPTIONS'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': '_new_options'}
For each part, create the inheritance parts from the ' extends '
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'read_form_data'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '18', '24']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '10']}; {'id': '7', 'type': 'attribute', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'processed_data'}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'raise_statement', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'exceptions'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'AlreadyProcessed'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'string', 'children': [], 'value': "'The data has already been processed for this form'"}; {'id': '18', 'type': 'if_statement', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'readonly'}; {'id': '22', 'type': 'block', 'children': ['23']}; {'id': '23', 'type': 'return_statement', 'children': []}; {'id': '24', 'type': 'if_statement', 'children': ['25', '32']}; {'id': '25', 'type': 'comparison_operator', 'children': ['26', '29'], 'value': '=='}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'method'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'method'}; {'id': '32', 'type': 'block', 'children': ['33', '54']}; {'id': '33', 'type': 'if_statement', 'children': ['34', '39', '46']}; {'id': '34', 'type': 'comparison_operator', 'children': ['35', '38'], 'value': '=='}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'method'}; {'id': '38', 'type': 'string', 'children': [], 'value': "'POST'"}; {'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': 'data'}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'form'}; {'id': '46', 'type': 'else_clause', 'children': ['47']}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'assignment', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '54', 'type': 'if_statement', 'children': ['55', '60']}; {'id': '55', 'type': 'comparison_operator', 'children': ['56', '59'], 'value': 'in'}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'submitted_hidden_input_name'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '60', 'type': 'block', 'children': ['61', '67']}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'processed_data'}; {'id': '66', 'type': 'True', 'children': []}; {'id': '67', 'type': 'for_statement', 'children': ['68', '69', '72']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'all_fields'}; {'id': '72', 'type': 'block', 'children': ['73']}; {'id': '73', 'type': 'if_statement', 'children': ['74', '77', '79']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'readonly'}; {'id': '77', 'type': 'block', 'children': ['78']}; {'id': '78', 'type': 'pass_statement', 'children': []}; {'id': '79', 'type': 'else_clause', 'children': ['80']}; {'id': '80', 'type': 'block', 'children': ['81', '88']}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'call', 'children': ['83', '86']}; {'id': '83', 'type': 'attribute', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'extract_value'}; {'id': '86', 'type': 'argument_list', 'children': ['87']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '88', 'type': 'if_statement', 'children': ['89', '95']}; {'id': '89', 'type': 'not_operator', 'children': ['90']}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'validate'}; {'id': '94', 'type': 'argument_list', 'children': []}; {'id': '95', 'type': 'block', 'children': ['96', '111']}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'binary_operator', 'children': ['103', '104'], 'value': '%'}; {'id': '103', 'type': 'string', 'children': [], 'value': "'Validation error in field \\'%s\\': %s'"}; {'id': '104', 'type': 'tuple', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'assignment', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'has_errors'}; {'id': '116', 'type': 'True', 'children': []}
Attempt to read the form data 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': '_imm_trans_setattr'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '7', 'type': 'block', 'children': ['8', '10', '17', '27']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'string', 'children': [], 'value': "'''\n An immutable's transient setattr allows params to be set, and runs checks as they are.\n '''"}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': '_imm_param_data'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'object'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': '__getattribute__'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'string', 'children': [], 'value': "'__dict__'"}; {'id': '27', 'type': 'if_statement', 'children': ['28', '31', '166']}; {'id': '28', 'type': 'comparison_operator', 'children': ['29', '30'], 'value': 'in'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '31', 'type': 'block', 'children': ['32', '43', '55', '59', '65', '86']}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '40']}; {'id': '34', 'type': 'tuple_pattern', 'children': ['35', '36', '37', '38', '39']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'tx_fn'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'arg_lists'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'check_fns'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'deps'}; {'id': '40', 'type': 'subscript', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '46', 'type': 'conditional_expression', 'children': ['47', '48', '51'], 'value': 'if'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '48', 'type': 'comparison_operator', 'children': ['49', '50'], 'value': 'is'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'tx_fn'}; {'id': '50', 'type': 'None', 'children': []}; {'id': '51', 'type': 'call', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'tx_fn'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'assignment', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'old_deps'}; {'id': '58', 'type': 'dictionary', 'children': []}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'orig_value'}; {'id': '62', 'type': 'subscript', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '65', 'type': 'for_statement', 'children': ['66', '67', '68']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'deps'}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'if_statement', 'children': ['70', '73']}; {'id': '70', 'type': 'comparison_operator', 'children': ['71', '72'], 'value': 'in'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '73', 'type': 'block', 'children': ['74', '82']}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '79']}; {'id': '76', 'type': 'subscript', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'old_deps'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '79', 'type': 'subscript', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '82', 'type': 'delete_statement', 'children': ['83']}; {'id': '83', 'type': 'subscript', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '86', 'type': 'try_statement', 'children': ['87', '138']}; {'id': '87', 'type': 'block', 'children': ['88', '94', '134']}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'assignment', 'children': ['90', '93']}; {'id': '90', 'type': 'subscript', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '94', 'type': 'for_statement', 'children': ['95', '98', '103']}; {'id': '95', 'type': 'tuple_pattern', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'check_fn'}; {'id': '98', 'type': 'call', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '100', 'type': 'argument_list', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'arg_lists'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'check_fns'}; {'id': '103', 'type': 'block', 'children': ['104']}; {'id': '104', 'type': 'if_statement', 'children': ['105', '119']}; {'id': '105', 'type': 'not_operator', 'children': ['106']}; {'id': '106', 'type': 'call', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'check_fn'}; {'id': '108', 'type': 'argument_list', 'children': ['109']}; {'id': '109', 'type': 'list_splat', 'children': ['110']}; {'id': '110', 'type': 'list_comprehension', 'children': ['111', '116']}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '113', 'type': 'argument_list', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '116', 'type': 'for_in_clause', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'raise_statement', 'children': ['121']}; {'id': '121', 'type': 'call', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'RuntimeError'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'binary_operator', 'children': ['125', '129'], 'value': '%'}; {'id': '125', 'type': '()', 'children': ['126']}; {'id': '126', 'type': 'binary_operator', 'children': ['127', '128'], 'value': '+'}; {'id': '127', 'type': 'string', 'children': [], 'value': "'Changing value of immutable attribute \\'%s\\''"}; {'id': '128', 'type': 'string', 'children': [], 'value': "' caused validation failure: %s'"}; {'id': '129', 'type': 'tuple', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '131', 'type': 'tuple', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'check_fn'}; {'id': '134', 'type': 'expression_statement', 'children': ['135']}; {'id': '135', 'type': 'assignment', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'old_deps'}; {'id': '137', 'type': 'None', 'children': []}; {'id': '138', 'type': 'finally_clause', 'children': ['139']}; {'id': '139', 'type': 'block', 'children': ['140']}; {'id': '140', 'type': 'if_statement', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'old_deps'}; {'id': '142', 'type': 'block', 'children': ['143', '160']}; {'id': '143', 'type': 'for_statement', 'children': ['144', '147', '153']}; {'id': '144', 'type': 'tuple_pattern', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '147', 'type': 'call', 'children': ['148', '151']}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'iteritems'}; {'id': '151', 'type': 'argument_list', 'children': ['152']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'old_deps'}; {'id': '153', 'type': 'block', 'children': ['154']}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '159']}; {'id': '156', 'type': 'subscript', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'dep'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '160', 'type': 'expression_statement', 'children': ['161']}; {'id': '161', 'type': 'assignment', 'children': ['162', '165']}; {'id': '162', 'type': 'subscript', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'dd'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'orig_value'}; {'id': '166', 'type': 'else_clause', 'children': ['167']}; {'id': '167', 'type': 'block', 'children': ['168']}; {'id': '168', 'type': 'raise_statement', 'children': ['169']}; {'id': '169', 'type': 'call', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'binary_operator', 'children': ['173', '174'], 'value': '%'}; {'id': '173', 'type': 'string', 'children': [], 'value': "'Attempt to change non-parameter member \\'%s\\' of transient immutable'"}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'name'}
An immutable's transient setattr allows params to be set, and runs checks as they are.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_add_single_session_to_to_ordered_dict'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'dataset_index'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'recommended_only'}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'for_statement', 'children': ['10', '13', '19']}; {'id': '10', 'type': 'pattern_list', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'model_index'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '19', 'type': 'block', 'children': ['20', '24', '76', '85', '96']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'show_null'}; {'id': '23', 'type': 'False', 'children': []}; {'id': '24', 'type': 'if_statement', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'recommended_only'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'if_statement', 'children': ['28', '31', '62']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'recommendation_enabled'}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'if_statement', 'children': ['33', '38', '51', '59']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '37'], 'value': 'is'}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'recommended_model'}; {'id': '37', 'type': 'None', 'children': []}; {'id': '38', 'type': 'block', 'children': ['39']}; {'id': '39', 'type': 'if_statement', 'children': ['40', '43', '48']}; {'id': '40', 'type': 'comparison_operator', 'children': ['41', '42'], 'value': '=='}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'model_index'}; {'id': '42', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '43', 'type': 'block', 'children': ['44']}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'show_null'}; {'id': '47', 'type': 'True', 'children': []}; {'id': '48', 'type': 'else_clause', 'children': ['49']}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'continue_statement', 'children': []}; {'id': '51', 'type': 'elif_clause', 'children': ['52', '57']}; {'id': '52', 'type': 'comparison_operator', 'children': ['53', '56'], 'value': '=='}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'recommended_model'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '57', 'type': 'block', 'children': ['58']}; {'id': '58', 'type': 'pass_statement', 'children': []}; {'id': '59', 'type': 'else_clause', 'children': ['60']}; {'id': '60', 'type': 'block', 'children': ['61']}; {'id': '61', 'type': 'continue_statement', 'children': []}; {'id': '62', 'type': 'else_clause', 'children': ['63']}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'if_statement', 'children': ['65', '68', '73']}; {'id': '65', 'type': 'comparison_operator', 'children': ['66', '67'], 'value': '=='}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'model_index'}; {'id': '67', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'show_null'}; {'id': '72', 'type': 'True', 'children': []}; {'id': '73', 'type': 'else_clause', 'children': ['74']}; {'id': '74', 'type': 'block', 'children': ['75']}; {'id': '75', 'type': 'continue_statement', 'children': []}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'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': 'd'}; {'id': '81', 'type': 'string', 'children': [], 'value': '"dataset_index"'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '83', 'type': 'argument_list', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'dataset_index'}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'subscript', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '90', 'type': 'string', 'children': [], 'value': '"doses_dropped"'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '92', 'type': 'argument_list', 'children': ['93']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'doses_dropped'}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': '_to_df'}; {'id': '101', 'type': 'argument_list', 'children': ['102', '103', '104']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'model_index'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'show_null'}
Save a single session to an ordered dictionary.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'do_mode'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '9', 'type': 'block', 'children': ['10', '21', '84', '138']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'mode_changes'}; {'id': '13', 'type': 'call', 'children': ['14', '19']}; {'id': '14', 'type': 'attribute', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'irc'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'modes'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'parse_channel_modes'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '21', 'type': 'with_statement', 'children': ['22', '27']}; {'id': '22', 'type': 'with_clause', 'children': ['23']}; {'id': '23', 'type': 'with_item', 'children': ['24']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'data_lock'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'for_statement', 'children': ['29', '30', '31']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'mode_changes'}; {'id': '31', 'type': 'block', 'children': ['32', '58']}; {'id': '32', 'type': 'if_statement', 'children': ['33', '38']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '37'], 'value': '=='}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '36', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '37', 'type': 'string', 'children': [], 'value': "'v'"}; {'id': '38', 'type': 'block', 'children': ['39']}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '50']}; {'id': '41', 'type': 'subscript', 'children': ['42', '47']}; {'id': '42', 'type': 'subscript', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'voiced'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '47', 'type': 'subscript', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '49', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '50', 'type': 'conditional_expression', 'children': ['51', '52', '57'], 'value': 'if'}; {'id': '51', 'type': 'True', 'children': []}; {'id': '52', 'type': 'comparison_operator', 'children': ['53', '56'], 'value': '=='}; {'id': '53', 'type': 'subscript', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '55', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '56', 'type': 'string', 'children': [], 'value': "'+'"}; {'id': '57', 'type': 'False', 'children': []}; {'id': '58', 'type': 'if_statement', 'children': ['59', '64']}; {'id': '59', 'type': 'comparison_operator', 'children': ['60', '63'], 'value': '=='}; {'id': '60', 'type': 'subscript', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '62', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'o'"}; {'id': '64', 'type': 'block', 'children': ['65']}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'assignment', 'children': ['67', '76']}; {'id': '67', 'type': 'subscript', 'children': ['68', '73']}; {'id': '68', 'type': 'subscript', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'opers'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '73', 'type': 'subscript', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '75', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '76', 'type': 'conditional_expression', 'children': ['77', '78', '83'], 'value': 'if'}; {'id': '77', 'type': 'True', 'children': []}; {'id': '78', 'type': 'comparison_operator', 'children': ['79', '82'], 'value': '=='}; {'id': '79', 'type': 'subscript', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'change'}; {'id': '81', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '82', 'type': 'string', 'children': [], 'value': "'+'"}; {'id': '83', 'type': 'False', 'children': []}; {'id': '84', 'type': 'if_statement', 'children': ['85', '97']}; {'id': '85', 'type': 'list_comprehension', 'children': ['86', '87', '90']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '87', 'type': 'for_in_clause', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'mode_changes'}; {'id': '90', 'type': 'if_clause', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'check_mode'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '97', 'type': 'block', 'children': ['98', '108']}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'call', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '101', 'type': 'argument_list', 'children': ['102', '105']}; {'id': '102', 'type': 'binary_operator', 'children': ['103', '104'], 'value': '%'}; {'id': '103', 'type': 'string', 'children': [], 'value': '"%s: :("'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '105', 'type': 'keyword_argument', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '108', 'type': 'if_statement', 'children': ['109', '117']}; {'id': '109', 'type': 'not_operator', 'children': ['110']}; {'id': '110', 'type': 'call', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'is_admin'}; {'id': '114', 'type': 'argument_list', 'children': ['115', '116']}; {'id': '115', 'type': 'None', 'children': []}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '117', 'type': 'block', 'children': ['118', '128']}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '121', 'type': 'argument_list', 'children': ['122', '125']}; {'id': '122', 'type': 'binary_operator', 'children': ['123', '124'], 'value': '%'}; {'id': '123', 'type': 'string', 'children': [], 'value': '"OP %s"'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '125', 'type': 'keyword_argument', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '127', 'type': 'string', 'children': [], 'value': "'ChanServ'"}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'call', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '131', 'type': 'argument_list', 'children': ['132', '135']}; {'id': '132', 'type': 'binary_operator', 'children': ['133', '134'], 'value': '%'}; {'id': '133', 'type': 'string', 'children': [], 'value': '"UNBAN %s"'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '135', 'type': 'keyword_argument', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '137', 'type': 'string', 'children': [], 'value': "'ChanServ'"}; {'id': '138', 'type': 'if_statement', 'children': ['139', '147']}; {'id': '139', 'type': 'comparison_operator', 'children': ['140', '146'], 'value': '>'}; {'id': '140', 'type': 'call', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '142', 'type': 'argument_list', 'children': ['143']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'guarded'}; {'id': '146', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '147', 'type': 'block', 'children': ['148', '161', '171']}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '151', 'type': 'binary_operator', 'children': ['152', '153'], 'value': '%'}; {'id': '152', 'type': 'string', 'children': [], 'value': 'r"(.*(-v|-o|\\+q|\\+b)[^ ]*) (%s)"'}; {'id': '153', 'type': 'call', 'children': ['154', '157']}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'string', 'children': [], 'value': '"|"'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'guarded'}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'assignment', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '164', 'type': 'call', 'children': ['165', '168']}; {'id': '165', 'type': 'attribute', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'search'}; {'id': '168', 'type': 'argument_list', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'regex'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '171', 'type': 'if_statement', 'children': ['172', '188']}; {'id': '172', 'type': 'boolean_operator', 'children': ['173', '174'], 'value': 'and'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '174', 'type': 'comparison_operator', 'children': ['175', '176'], 'value': 'not'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '176', 'type': 'list', 'children': ['177', '183'], 'value': '[match.group(3), self.connection.real_nickname]'}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'integer', 'children': [], 'value': '3'}; {'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': 'connection'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'real_nickname'}; {'id': '188', 'type': 'block', 'children': ['189', '209', '219']}; {'id': '189', 'type': 'expression_statement', 'children': ['190']}; {'id': '190', 'type': 'assignment', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'modestring'}; {'id': '192', 'type': 'binary_operator', 'children': ['193', '194'], 'value': '%'}; {'id': '193', 'type': 'string', 'children': [], 'value': '"+voe-qb %s"'}; {'id': '194', 'type': '()', 'children': ['195']}; {'id': '195', 'type': 'call', 'children': ['196', '199']}; {'id': '196', 'type': 'attribute', 'children': ['197', '198']}; {'id': '197', 'type': 'string', 'children': [], 'value': '" "'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '199', 'type': 'argument_list', 'children': ['200']}; {'id': '200', 'type': 'binary_operator', 'children': ['201', '208'], 'value': '*'}; {'id': '201', 'type': 'list', 'children': ['202'], 'value': '[match.group(3)]'}; {'id': '202', 'type': 'call', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '206', 'type': 'argument_list', 'children': ['207']}; {'id': '207', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '208', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '209', 'type': 'expression_statement', 'children': ['210']}; {'id': '210', 'type': 'call', 'children': ['211', '216']}; {'id': '211', 'type': 'attribute', 'children': ['212', '215']}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'connection'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '216', 'type': 'argument_list', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'modestring'}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'call', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '222', 'type': 'argument_list', 'children': ['223', '228']}; {'id': '223', 'type': 'binary_operator', 'children': ['224', '225'], 'value': '%'}; {'id': '224', 'type': 'string', 'children': [], 'value': "'Mode %s on %s by the guard system'"}; {'id': '225', 'type': 'tuple', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'modestring'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '228', 'type': 'keyword_argument', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '230', 'type': 'subscript', 'children': ['231', '236']}; {'id': '231', 'type': 'subscript', 'children': ['232', '235']}; {'id': '232', 'type': 'attribute', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '235', 'type': 'string', 'children': [], 'value': "'core'"}; {'id': '236', 'type': 'string', 'children': [], 'value': "'ctrlchan'"}
reop and handle guard violations.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'handle_msg'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '7', 'type': 'block', 'children': ['8', '36', '64', '77', '106', '137', '148', '160', '178', '196', '227', '245', '276', '294', '305', '313', '329', '340']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '19', '28']}; {'id': '9', 'type': 'comparison_operator', 'children': ['10', '13'], 'value': 'not'}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '13', 'type': 'list', 'children': ['14', '15', '16', '17', '18'], 'value': "['authenticate', 'error', 'join', 'part', 'quit']"}; {'id': '14', 'type': 'string', 'children': [], 'value': "'authenticate'"}; {'id': '15', 'type': 'string', 'children': [], 'value': "'error'"}; {'id': '16', 'type': 'string', 'children': [], 'value': "'join'"}; {'id': '17', 'type': 'string', 'children': [], 'value': "'part'"}; {'id': '18', 'type': 'string', 'children': [], 'value': "'quit'"}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '23', 'type': 'attribute', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '28', 'type': 'else_clause', 'children': ['29']}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '42', '47']}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '41'], 'value': 'is'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'arguments'}; {'id': '41', 'type': 'None', 'children': []}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '46', 'type': 'string', 'children': [], 'value': '""'}; {'id': '47', 'type': 'else_clause', 'children': ['48']}; {'id': '48', 'type': 'block', 'children': ['49']}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '52', 'type': 'call', 'children': ['53', '63']}; {'id': '53', 'type': 'attribute', 'children': ['54', '62']}; {'id': '54', 'type': 'call', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'string', 'children': [], 'value': '" "'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'arguments'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '63', 'type': 'argument_list', 'children': []}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '67', 'type': 'conditional_expression', 'children': ['68', '69', '74'], 'value': 'if'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '69', 'type': 'comparison_operator', 'children': ['70', '73'], 'value': '=='}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '73', 'type': 'string', 'children': [], 'value': "'privmsg'"}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '77', 'type': 'function_definition', 'children': ['78', '79', '90']}; {'id': '78', 'type': 'function_name', 'children': [], 'value': 'send'}; {'id': '79', 'type': 'parameters', 'children': ['80', '81', '84', '87']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '81', 'type': 'default_parameter', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'mtype'}; {'id': '83', 'type': 'string', 'children': [], 'value': "'privmsg'"}; {'id': '84', 'type': 'default_parameter', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '87', 'type': 'default_parameter', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'ignore_length'}; {'id': '89', 'type': 'False', 'children': []}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '96', 'type': 'argument_list', 'children': ['97', '98', '103', '104', '105']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '98', 'type': 'attribute', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'connection'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'real_nickname'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'mtype'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'ignore_length'}; {'id': '106', 'type': 'if_statement', 'children': ['107', '125']}; {'id': '107', 'type': 'comparison_operator', 'children': ['108', '111'], 'value': 'in'}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '111', 'type': 'list', 'children': ['112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122', '123', '124'], 'value': "[\n 'account', 'authenticate', 'bannedfromchan', 'cap', 'ctcpreply', 'error', 'featurelist', 'nosuchnick', 'nick', 'nicknameinuse',\n 'privnotice', 'welcome', 'whospcrpl'\n ]"}; {'id': '112', 'type': 'string', 'children': [], 'value': "'account'"}; {'id': '113', 'type': 'string', 'children': [], 'value': "'authenticate'"}; {'id': '114', 'type': 'string', 'children': [], 'value': "'bannedfromchan'"}; {'id': '115', 'type': 'string', 'children': [], 'value': "'cap'"}; {'id': '116', 'type': 'string', 'children': [], 'value': "'ctcpreply'"}; {'id': '117', 'type': 'string', 'children': [], 'value': "'error'"}; {'id': '118', 'type': 'string', 'children': [], 'value': "'featurelist'"}; {'id': '119', 'type': 'string', 'children': [], 'value': "'nosuchnick'"}; {'id': '120', 'type': 'string', 'children': [], 'value': "'nick'"}; {'id': '121', 'type': 'string', 'children': [], 'value': "'nicknameinuse'"}; {'id': '122', 'type': 'string', 'children': [], 'value': "'privnotice'"}; {'id': '123', 'type': 'string', 'children': [], 'value': "'welcome'"}; {'id': '124', 'type': 'string', 'children': [], 'value': "'whospcrpl'"}; {'id': '125', 'type': 'block', 'children': ['126', '136']}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'handle_event'}; {'id': '131', 'type': 'argument_list', 'children': ['132', '133', '134', '135']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '136', 'type': 'return_statement', 'children': []}; {'id': '137', 'type': 'if_statement', 'children': ['138', '146']}; {'id': '138', 'type': 'boolean_operator', 'children': ['139', '141'], 'value': 'and'}; {'id': '139', 'type': 'not_operator', 'children': ['140']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '141', 'type': 'comparison_operator', 'children': ['142', '145'], 'value': '!='}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '145', 'type': 'string', 'children': [], 'value': "'join'"}; {'id': '146', 'type': 'block', 'children': ['147']}; {'id': '147', 'type': 'return_statement', 'children': []}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'call', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'do_log'}; {'id': '153', 'type': 'argument_list', 'children': ['154', '155', '156', '157']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '160', 'type': 'if_statement', 'children': ['161', '166']}; {'id': '161', 'type': 'comparison_operator', 'children': ['162', '165'], 'value': '=='}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '165', 'type': 'string', 'children': [], 'value': "'mode'"}; {'id': '166', 'type': 'block', 'children': ['167', '177']}; {'id': '167', 'type': 'expression_statement', 'children': ['168']}; {'id': '168', 'type': 'call', 'children': ['169', '172']}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'do_mode'}; {'id': '172', 'type': 'argument_list', 'children': ['173', '174', '175', '176']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '177', 'type': 'return_statement', 'children': []}; {'id': '178', 'type': 'if_statement', 'children': ['179', '184']}; {'id': '179', 'type': 'comparison_operator', 'children': ['180', '183'], 'value': '=='}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '183', 'type': 'string', 'children': [], 'value': "'join'"}; {'id': '184', 'type': 'block', 'children': ['185', '195']}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'call', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'handle_join'}; {'id': '190', 'type': 'argument_list', 'children': ['191', '192', '193', '194']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '195', 'type': 'return_statement', 'children': []}; {'id': '196', 'type': 'if_statement', 'children': ['197', '202']}; {'id': '197', 'type': 'comparison_operator', 'children': ['198', '201'], 'value': '=='}; {'id': '198', 'type': 'attribute', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '201', 'type': 'string', 'children': [], 'value': "'part'"}; {'id': '202', 'type': 'block', 'children': ['203', '226']}; {'id': '203', 'type': 'if_statement', 'children': ['204', '209']}; {'id': '204', 'type': 'comparison_operator', 'children': ['205', '206'], 'value': '=='}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '206', 'type': 'attribute', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'real_nickname'}; {'id': '209', 'type': 'block', 'children': ['210']}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '213', 'type': 'argument_list', 'children': ['214', '217']}; {'id': '214', 'type': 'binary_operator', 'children': ['215', '216'], 'value': '%'}; {'id': '215', 'type': 'string', 'children': [], 'value': '"Parted channel %s"'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '217', 'type': 'keyword_argument', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '219', 'type': 'subscript', 'children': ['220', '225']}; {'id': '220', 'type': 'subscript', 'children': ['221', '224']}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '224', 'type': 'string', 'children': [], 'value': "'core'"}; {'id': '225', 'type': 'string', 'children': [], 'value': "'ctrlchan'"}; {'id': '226', 'type': 'return_statement', 'children': []}; {'id': '227', 'type': 'if_statement', 'children': ['228', '233']}; {'id': '228', 'type': 'comparison_operator', 'children': ['229', '232'], 'value': '=='}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '232', 'type': 'string', 'children': [], 'value': "'kick'"}; {'id': '233', 'type': 'block', 'children': ['234', '244']}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'handle_kick'}; {'id': '239', 'type': 'argument_list', 'children': ['240', '241', '242', '243']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '244', 'type': 'return_statement', 'children': []}; {'id': '245', 'type': 'if_statement', 'children': ['246', '265']}; {'id': '246', 'type': 'boolean_operator', 'children': ['247', '258'], 'value': 'and'}; {'id': '247', 'type': 'comparison_operator', 'children': ['248', '251'], 'value': '=='}; {'id': '248', 'type': 'attribute', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '251', 'type': 'subscript', 'children': ['252', '257']}; {'id': '252', 'type': 'subscript', 'children': ['253', '256']}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '256', 'type': 'string', 'children': [], 'value': "'core'"}; {'id': '257', 'type': 'string', 'children': [], 'value': "'ctrlchan'"}; {'id': '258', 'type': 'call', 'children': ['259', '262']}; {'id': '259', 'type': 'attribute', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'is_admin'}; {'id': '262', 'type': 'argument_list', 'children': ['263', '264']}; {'id': '263', 'type': 'None', 'children': []}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '265', 'type': 'block', 'children': ['266']}; {'id': '266', 'type': 'expression_statement', 'children': ['267']}; {'id': '267', 'type': 'call', 'children': ['268', '271']}; {'id': '268', 'type': 'attribute', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'handle_ctrlchan'}; {'id': '271', 'type': 'argument_list', 'children': ['272', '273', '274', '275']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '276', 'type': 'if_statement', 'children': ['277', '292']}; {'id': '277', 'type': 'boolean_operator', 'children': ['278', '284'], 'value': 'and'}; {'id': '278', 'type': 'call', 'children': ['279', '282']}; {'id': '279', 'type': 'attribute', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'is_ignored'}; {'id': '282', 'type': 'argument_list', 'children': ['283']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '284', 'type': 'not_operator', 'children': ['285']}; {'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': 'is_admin'}; {'id': '289', 'type': 'argument_list', 'children': ['290', '291']}; {'id': '290', 'type': 'None', 'children': []}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '292', 'type': 'block', 'children': ['293']}; {'id': '293', 'type': 'return_statement', 'children': []}; {'id': '294', 'type': 'expression_statement', 'children': ['295']}; {'id': '295', 'type': 'call', 'children': ['296', '299']}; {'id': '296', 'type': 'attribute', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'handle_hooks'}; {'id': '299', 'type': 'argument_list', 'children': ['300', '301', '302', '303', '304']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '305', 'type': 'if_statement', 'children': ['306', '311']}; {'id': '306', 'type': 'comparison_operator', 'children': ['307', '310'], 'value': '=='}; {'id': '307', 'type': 'attribute', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '310', 'type': 'string', 'children': [], 'value': "'pubnotice'"}; {'id': '311', 'type': 'block', 'children': ['312']}; {'id': '312', 'type': 'return_statement', 'children': []}; {'id': '313', 'type': 'expression_statement', 'children': ['314']}; {'id': '314', 'type': 'assignment', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '316', 'type': 'call', 'children': ['317', '320']}; {'id': '317', 'type': 'attribute', 'children': ['318', '319']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'misc'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'get_cmdchar'}; {'id': '320', 'type': 'argument_list', 'children': ['321', '324', '325', '326']}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '326', 'type': 'attribute', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '329', 'type': 'expression_statement', 'children': ['330']}; {'id': '330', 'type': 'assignment', 'children': ['331', '334']}; {'id': '331', 'type': 'pattern_list', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'cmd_name'}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'cmdargs'}; {'id': '334', 'type': 'call', 'children': ['335', '338']}; {'id': '335', 'type': 'attribute', 'children': ['336', '337']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'get_cmd'}; {'id': '338', 'type': 'argument_list', 'children': ['339']}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '340', 'type': 'if_statement', 'children': ['341', '349', '362']}; {'id': '341', 'type': 'call', 'children': ['342', '347']}; {'id': '342', 'type': 'attribute', 'children': ['343', '346']}; {'id': '343', 'type': 'attribute', 'children': ['344', '345']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'command_registry'}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'is_registered'}; {'id': '347', 'type': 'argument_list', 'children': ['348']}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'cmd_name'}; {'id': '349', 'type': 'block', 'children': ['350']}; {'id': '350', 'type': 'expression_statement', 'children': ['351']}; {'id': '351', 'type': 'call', 'children': ['352', '355']}; {'id': '352', 'type': 'attribute', 'children': ['353', '354']}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'run_cmd'}; {'id': '355', 'type': 'argument_list', 'children': ['356', '357', '358', '359', '360', '361']}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'cmd_name'}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'cmdargs'}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '362', 'type': 'elif_clause', 'children': ['363', '366']}; {'id': '363', 'type': 'comparison_operator', 'children': ['364', '365'], 'value': '=='}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'cmd_name'}; {'id': '365', 'type': 'string', 'children': [], 'value': "'reload'"}; {'id': '366', 'type': 'block', 'children': ['367']}; {'id': '367', 'type': 'with_statement', 'children': ['368', '380']}; {'id': '368', 'type': 'with_clause', 'children': ['369']}; {'id': '369', 'type': 'with_item', 'children': ['370']}; {'id': '370', 'type': 'as_pattern', 'children': ['371', '378']}; {'id': '371', 'type': 'call', 'children': ['372', '377']}; {'id': '372', 'type': 'attribute', 'children': ['373', '376']}; {'id': '373', 'type': 'attribute', 'children': ['374', '375']}; {'id': '374', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'session_scope'}; {'id': '377', 'type': 'argument_list', 'children': []}; {'id': '378', 'type': 'as_pattern_target', 'children': ['379']}; {'id': '379', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '380', 'type': 'block', 'children': ['381']}; {'id': '381', 'type': 'if_statement', 'children': ['382', '405']}; {'id': '382', 'type': 'call', 'children': ['383', '404']}; {'id': '383', 'type': 'attribute', 'children': ['384', '403']}; {'id': '384', 'type': 'call', 'children': ['385', '395']}; {'id': '385', 'type': 'attribute', 'children': ['386', '394']}; {'id': '386', 'type': 'call', 'children': ['387', '390']}; {'id': '387', 'type': 'attribute', 'children': ['388', '389']}; {'id': '388', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '389', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '390', 'type': 'argument_list', 'children': ['391']}; {'id': '391', 'type': 'attribute', 'children': ['392', '393']}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'orm'}; {'id': '393', 'type': 'identifier', 'children': [], 'value': 'Permissions'}; {'id': '394', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '395', 'type': 'argument_list', 'children': ['396']}; {'id': '396', 'type': 'comparison_operator', 'children': ['397', '402'], 'value': '=='}; {'id': '397', 'type': 'attribute', 'children': ['398', '401']}; {'id': '398', 'type': 'attribute', 'children': ['399', '400']}; {'id': '399', 'type': 'identifier', 'children': [], 'value': 'orm'}; {'id': '400', 'type': 'identifier', 'children': [], 'value': 'Permissions'}; {'id': '401', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '402', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '403', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '404', 'type': 'argument_list', 'children': []}; {'id': '405', 'type': 'block', 'children': ['406']}; {'id': '406', 'type': 'expression_statement', 'children': ['407']}; {'id': '407', 'type': 'call', 'children': ['408', '409']}; {'id': '408', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '409', 'type': 'argument_list', 'children': ['410']}; {'id': '410', 'type': 'string', 'children': [], 'value': '"Aye Aye Capt\'n"'}
The Heart and Soul of IrcBot.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'cmdloop'}; {'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': 'intro'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '11', '17', '65']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'string', 'children': [], 'value': "''' Override the command loop to handle Ctrl-C. '''"}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'preloop'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'if_statement', 'children': ['18', '25']}; {'id': '18', 'type': 'boolean_operator', 'children': ['19', '22'], 'value': 'and'}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'use_rawinput'}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'completekey'}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'try_statement', 'children': ['27', '61']}; {'id': '27', 'type': 'block', 'children': ['28', '31', '41', '50']}; {'id': '28', 'type': 'import_statement', 'children': ['29']}; {'id': '29', 'type': 'dotted_name', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'old_completer'}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'get_completer'}; {'id': '40', 'type': 'argument_list', 'children': []}; {'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': 'readline'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'set_completer'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'complete'}; {'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': 'readline'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'parse_and_bind'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'binary_operator', 'children': ['57', '60'], 'value': '+'}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'completekey'}; {'id': '60', 'type': 'string', 'children': [], 'value': "': complete'"}; {'id': '61', 'type': 'except_clause', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'ImportError'}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'pass_statement', 'children': []}; {'id': '65', 'type': 'try_statement', 'children': ['66', '262']}; {'id': '66', 'type': 'block', 'children': ['67', '78', '99', '103', '256']}; {'id': '67', 'type': 'if_statement', 'children': ['68', '71']}; {'id': '68', 'type': 'comparison_operator', 'children': ['69', '70'], 'value': 'is'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'intro'}; {'id': '70', 'type': 'None', 'children': []}; {'id': '71', 'type': 'block', 'children': ['72']}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '77']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'intro'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'intro'}; {'id': '78', 'type': 'if_statement', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'intro'}; {'id': '82', 'type': 'block', 'children': ['83']}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'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': 'self'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'stdout'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'binary_operator', 'children': ['92', '98'], 'value': '+'}; {'id': '92', 'type': 'call', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '94', 'type': 'argument_list', 'children': ['95']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'intro'}; {'id': '98', 'type': 'string', 'children': [], 'value': '"\\n"'}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '102', 'type': 'None', 'children': []}; {'id': '103', 'type': 'while_statement', 'children': ['104', '106']}; {'id': '104', 'type': 'not_operator', 'children': ['105']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '106', 'type': 'block', 'children': ['107', '228', '237', '246']}; {'id': '107', 'type': 'if_statement', 'children': ['108', '111', '123']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'cmdqueue'}; {'id': '111', 'type': 'block', 'children': ['112']}; {'id': '112', 'type': 'expression_statement', 'children': ['113']}; {'id': '113', 'type': 'assignment', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '115', 'type': 'call', 'children': ['116', '121']}; {'id': '116', 'type': 'attribute', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'cmdqueue'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '123', 'type': 'else_clause', 'children': ['124']}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'if_statement', 'children': ['126', '129', '175']}; {'id': '126', 'type': 'attribute', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'use_rawinput'}; {'id': '129', 'type': 'block', 'children': ['130']}; {'id': '130', 'type': 'try_statement', 'children': ['131', '161', '168']}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'if_statement', 'children': ['133', '140', '150']}; {'id': '133', 'type': 'comparison_operator', 'children': ['134', '139'], 'value': '=='}; {'id': '134', 'type': 'subscript', 'children': ['135', '138']}; {'id': '135', 'type': 'attribute', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'version_info'}; {'id': '138', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '139', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '144', 'type': 'call', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'raw_input'}; {'id': '146', 'type': 'argument_list', 'children': ['147']}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'prompt'}; {'id': '150', 'type': 'else_clause', 'children': ['151']}; {'id': '151', 'type': 'block', 'children': ['152']}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '155', 'type': 'call', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'input'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'prompt'}; {'id': '161', 'type': 'except_clause', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'EOFError'}; {'id': '163', 'type': 'block', 'children': ['164']}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'assignment', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '167', 'type': 'string', 'children': [], 'value': "'EOF'"}; {'id': '168', 'type': 'except_clause', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'KeyboardInterrupt'}; {'id': '170', 'type': 'block', 'children': ['171']}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'assignment', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '174', 'type': 'string', 'children': [], 'value': "'ctrlc'"}; {'id': '175', 'type': 'else_clause', 'children': ['176']}; {'id': '176', 'type': 'block', 'children': ['177', '188', '196', '206']}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'call', 'children': ['179', '184']}; {'id': '179', 'type': 'attribute', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'stdout'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'prompt'}; {'id': '188', 'type': 'expression_statement', 'children': ['189']}; {'id': '189', 'type': 'call', 'children': ['190', '195']}; {'id': '190', 'type': 'attribute', 'children': ['191', '194']}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'stdout'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'flush'}; {'id': '195', 'type': 'argument_list', 'children': []}; {'id': '196', 'type': 'expression_statement', 'children': ['197']}; {'id': '197', 'type': 'assignment', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '199', 'type': 'call', 'children': ['200', '205']}; {'id': '200', 'type': 'attribute', 'children': ['201', '204']}; {'id': '201', 'type': 'attribute', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'stdin'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '205', 'type': 'argument_list', 'children': []}; {'id': '206', 'type': 'if_statement', 'children': ['207', '212', '217']}; {'id': '207', 'type': 'not_operator', 'children': ['208']}; {'id': '208', 'type': 'call', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '210', 'type': 'argument_list', 'children': ['211']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '212', 'type': 'block', 'children': ['213']}; {'id': '213', 'type': 'expression_statement', 'children': ['214']}; {'id': '214', 'type': 'assignment', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '216', 'type': 'string', 'children': [], 'value': "'EOF'"}; {'id': '217', 'type': 'else_clause', 'children': ['218']}; {'id': '218', 'type': 'block', 'children': ['219']}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'assignment', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '222', 'type': 'call', 'children': ['223', '226']}; {'id': '223', 'type': 'attribute', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '226', 'type': 'argument_list', 'children': ['227']}; {'id': '227', 'type': 'string', 'children': [], 'value': "'\\r\\n'"}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'assignment', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '231', 'type': 'call', 'children': ['232', '235']}; {'id': '232', 'type': 'attribute', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'precmd'}; {'id': '235', 'type': 'argument_list', 'children': ['236']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '237', 'type': 'expression_statement', 'children': ['238']}; {'id': '238', 'type': 'assignment', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '240', 'type': 'call', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'onecmd'}; {'id': '244', 'type': 'argument_list', 'children': ['245']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '246', 'type': 'expression_statement', 'children': ['247']}; {'id': '247', 'type': 'assignment', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '249', 'type': 'call', 'children': ['250', '253']}; {'id': '250', 'type': 'attribute', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'postcmd'}; {'id': '253', 'type': 'argument_list', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '256', 'type': 'expression_statement', 'children': ['257']}; {'id': '257', 'type': 'call', 'children': ['258', '261']}; {'id': '258', 'type': 'attribute', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'postloop'}; {'id': '261', 'type': 'argument_list', 'children': []}; {'id': '262', 'type': 'finally_clause', 'children': ['263']}; {'id': '263', 'type': 'block', 'children': ['264']}; {'id': '264', 'type': 'if_statement', 'children': ['265', '272']}; {'id': '265', 'type': 'boolean_operator', 'children': ['266', '269'], 'value': 'and'}; {'id': '266', 'type': 'attribute', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'use_rawinput'}; {'id': '269', 'type': 'attribute', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'completekey'}; {'id': '272', 'type': 'block', 'children': ['273']}; {'id': '273', 'type': 'try_statement', 'children': ['274', '287']}; {'id': '274', 'type': 'block', 'children': ['275', '278']}; {'id': '275', 'type': 'import_statement', 'children': ['276']}; {'id': '276', 'type': 'dotted_name', 'children': ['277']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '278', 'type': 'expression_statement', 'children': ['279']}; {'id': '279', 'type': 'call', 'children': ['280', '283']}; {'id': '280', 'type': 'attribute', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'set_completer'}; {'id': '283', 'type': 'argument_list', 'children': ['284']}; {'id': '284', 'type': 'attribute', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'old_completer'}; {'id': '287', 'type': 'except_clause', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'ImportError'}; {'id': '289', 'type': 'block', 'children': ['290']}; {'id': '290', 'type': 'pass_statement', 'children': []}
Override the command loop to handle Ctrl-C.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'free'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '6', 'type': 'block', 'children': ['7', '9', '17', '27', '35', '45', '52', '61', '72', '83', '93', '131', '140', '288']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'string', 'children': [], 'value': "'''\n Stop synchronization of local_path\n '''"}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'get_config'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'folder'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'st_util'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'find_folder_with_path'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'config'}; {'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': 'delete_folder'}; {'id': '32', 'type': 'argument_list', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'pruned'}; {'id': '38', 'type': 'call', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'st_util'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'prune_devices'}; {'id': '42', 'type': 'argument_list', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'folder'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'set_config'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '52', 'type': 'if_statement', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'pruned'}; {'id': '54', 'type': 'block', 'children': ['55']}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'restart'}; {'id': '60', 'type': 'argument_list', 'children': []}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'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': 'adapter'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'get_dir_config'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '72', 'type': 'if_statement', 'children': ['73', '75']}; {'id': '73', 'type': 'not_operator', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '75', 'type': 'block', 'children': ['76']}; {'id': '76', 'type': 'raise_statement', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'custom_errors'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'FileNotInConfig'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'kodrive_config'}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'adapter'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'get_config'}; {'id': '92', 'type': 'argument_list', 'children': []}; {'id': '93', 'type': 'for_statement', 'children': ['94', '95', '98']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '95', 'type': 'subscript', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'kodrive_config'}; {'id': '97', 'type': 'string', 'children': [], 'value': "'directories'"}; {'id': '98', 'type': 'block', 'children': ['99', '107']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '102', 'type': 'subscript', 'children': ['103', '106']}; {'id': '103', 'type': 'subscript', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'kodrive_config'}; {'id': '105', 'type': 'string', 'children': [], 'value': "'directories'"}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '107', 'type': 'if_statement', 'children': ['108', '123']}; {'id': '108', 'type': 'comparison_operator', 'children': ['109', '117'], 'value': '=='}; {'id': '109', 'type': 'call', 'children': ['110', '115']}; {'id': '110', 'type': 'attribute', 'children': ['111', '114']}; {'id': '111', 'type': 'subscript', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '113', 'type': 'string', 'children': [], 'value': "'local_path'"}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '115', 'type': 'argument_list', 'children': ['116']}; {'id': '116', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '117', 'type': 'call', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'local_path'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '123', 'type': 'block', 'children': ['124', '130']}; {'id': '124', 'type': 'delete_statement', 'children': ['125']}; {'id': '125', 'type': 'subscript', 'children': ['126', '129']}; {'id': '126', 'type': 'subscript', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'kodrive_config'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'directories'"}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '130', 'type': 'break_statement', 'children': []}; {'id': '131', 'type': 'expression_statement', 'children': ['132']}; {'id': '132', 'type': 'call', 'children': ['133', '138']}; {'id': '133', 'type': 'attribute', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'adapter'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'set_config'}; {'id': '138', 'type': 'argument_list', 'children': ['139']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'kodrive_config'}; {'id': '140', 'type': 'if_statement', 'children': ['141', '148']}; {'id': '141', 'type': 'boolean_operator', 'children': ['142', '145'], 'value': 'and'}; {'id': '142', 'type': 'subscript', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '144', 'type': 'string', 'children': [], 'value': "'is_shared'"}; {'id': '145', 'type': 'subscript', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '147', 'type': 'string', 'children': [], 'value': "'server'"}; {'id': '148', 'type': 'block', 'children': ['149', '155', '161', '184', '213', '221', '233', '241', '249', '262', '272', '279']}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'assignment', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'r_api_key'}; {'id': '152', 'type': 'subscript', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '154', 'type': 'string', 'children': [], 'value': "'api_key'"}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'assignment', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'r_device_id'}; {'id': '158', 'type': 'subscript', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '160', 'type': 'string', 'children': [], 'value': "'device_id'"}; {'id': '161', 'type': 'if_statement', 'children': ['162', '165', '172']}; {'id': '162', 'type': 'subscript', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '164', 'type': 'string', 'children': [], 'value': "'host'"}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'host'}; {'id': '169', 'type': 'subscript', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '171', 'type': 'string', 'children': [], 'value': "'host'"}; {'id': '172', 'type': 'else_clause', 'children': ['173']}; {'id': '173', 'type': 'block', 'children': ['174']}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'assignment', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'host'}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'devid_to_ip'}; {'id': '181', 'type': 'argument_list', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'r_device_id'}; {'id': '183', 'type': 'False', 'children': []}; {'id': '184', 'type': 'try_statement', 'children': ['185', '205']}; {'id': '185', 'type': 'block', 'children': ['186']}; {'id': '186', 'type': 'expression_statement', 'children': ['187']}; {'id': '187', 'type': 'assignment', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '189', 'type': 'call', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'SyncthingProxy'}; {'id': '191', 'type': 'argument_list', 'children': ['192', '193', '194', '195']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'r_device_id'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'host'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'r_api_key'}; {'id': '195', 'type': 'keyword_argument', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'port'}; {'id': '197', 'type': 'conditional_expression', 'children': ['198', '201', '204'], 'value': 'if'}; {'id': '198', 'type': 'subscript', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '200', 'type': 'string', 'children': [], 'value': "'port'"}; {'id': '201', 'type': 'comparison_operator', 'children': ['202', '203'], 'value': 'in'}; {'id': '202', 'type': 'string', 'children': [], 'value': "'port'"}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '204', 'type': 'None', 'children': []}; {'id': '205', 'type': 'except_clause', 'children': ['206', '210']}; {'id': '206', 'type': 'as_pattern', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '208', 'type': 'as_pattern_target', 'children': ['209']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '210', 'type': 'block', 'children': ['211']}; {'id': '211', 'type': 'return_statement', 'children': ['212']}; {'id': '212', 'type': 'True', 'children': []}; {'id': '213', 'type': 'expression_statement', 'children': ['214']}; {'id': '214', 'type': 'assignment', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '216', 'type': 'call', 'children': ['217', '220']}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'get_config'}; {'id': '220', 'type': 'argument_list', 'children': []}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'assignment', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'r_folder'}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'st_util'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'find_folder_with_path'}; {'id': '228', 'type': 'argument_list', 'children': ['229', '232']}; {'id': '229', 'type': 'subscript', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '231', 'type': 'string', 'children': [], 'value': "'remote_path'"}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '236', 'type': 'call', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'get_config'}; {'id': '240', 'type': 'argument_list', 'children': []}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'assignment', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'self_devid'}; {'id': '244', 'type': 'call', 'children': ['245', '248']}; {'id': '245', 'type': 'attribute', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'get_device_id'}; {'id': '248', 'type': 'argument_list', 'children': []}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'del_device'}; {'id': '252', 'type': 'call', 'children': ['253', '256']}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'delete_device_from_folder'}; {'id': '256', 'type': 'argument_list', 'children': ['257', '260', '261']}; {'id': '257', 'type': 'subscript', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'dir_config'}; {'id': '259', 'type': 'string', 'children': [], 'value': "'remote_path'"}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'self_devid'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '262', 'type': 'expression_statement', 'children': ['263']}; {'id': '263', 'type': 'assignment', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'pruned'}; {'id': '265', 'type': 'call', 'children': ['266', '269']}; {'id': '266', 'type': 'attribute', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'st_util'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'prune_devices'}; {'id': '269', 'type': 'argument_list', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'r_folder'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '272', 'type': 'expression_statement', 'children': ['273']}; {'id': '273', 'type': 'call', 'children': ['274', '277']}; {'id': '274', 'type': 'attribute', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'set_config'}; {'id': '277', 'type': 'argument_list', 'children': ['278']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'r_config'}; {'id': '279', 'type': 'if_statement', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'pruned'}; {'id': '281', 'type': 'block', 'children': ['282']}; {'id': '282', 'type': 'expression_statement', 'children': ['283']}; {'id': '283', 'type': 'call', 'children': ['284', '287']}; {'id': '284', 'type': 'attribute', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'remote'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'restart'}; {'id': '287', 'type': 'argument_list', 'children': []}; {'id': '288', 'type': 'return_statement', 'children': ['289']}; {'id': '289', 'type': 'True', 'children': []}
Stop synchronization of local_path
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'page_location_template'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '16', '26', '38']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '9', 'type': 'attribute', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'election_day'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'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': 'model_type'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'id': '25', 'type': 'argument_list', 'children': []}; {'id': '26', 'type': 'if_statement', 'children': ['27', '30']}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '29'], 'value': '=='}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'ElectionDay'}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'return_statement', 'children': ['32']}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'string', 'children': [], 'value': '"/{}/"'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '38', 'type': 'if_statement', 'children': ['39', '42', '84', '182', '194']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '41'], 'value': '=='}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'Office'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'if_statement', 'children': ['44', '47', '75']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'jurisdiction'}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'if_statement', 'children': ['49', '58', '66']}; {'id': '49', 'type': 'comparison_operator', 'children': ['50', '55'], 'value': '=='}; {'id': '50', 'type': 'attribute', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'division_level'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'DivisionLevel'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'STATE'}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'return_statement', 'children': ['60']}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'string', 'children': [], 'value': '"/{}/president/{{state}}"'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'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': 'string', 'children': [], 'value': '"/{}/president/"'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '75', 'type': 'else_clause', 'children': ['76']}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'return_statement', 'children': ['78']}; {'id': '78', 'type': 'call', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'string', 'children': [], 'value': '"/{}/{{state}}/governor/"'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '84', 'type': 'elif_clause', 'children': ['85', '88']}; {'id': '85', 'type': 'comparison_operator', 'children': ['86', '87'], 'value': '=='}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'Body'}; {'id': '88', 'type': 'block', 'children': ['89']}; {'id': '89', 'type': 'if_statement', 'children': ['90', '97', '139']}; {'id': '90', 'type': 'comparison_operator', 'children': ['91', '96'], 'value': '=='}; {'id': '91', 'type': 'attribute', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'body'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'slug'}; {'id': '96', 'type': 'string', 'children': [], 'value': '"senate"'}; {'id': '97', 'type': 'block', 'children': ['98']}; {'id': '98', 'type': 'if_statement', 'children': ['99', '102', '130']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'jurisdiction'}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'if_statement', 'children': ['104', '113', '121']}; {'id': '104', 'type': 'comparison_operator', 'children': ['105', '110'], 'value': '=='}; {'id': '105', 'type': 'attribute', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'division_level'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '110', 'type': 'attribute', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'DivisionLevel'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'STATE'}; {'id': '113', 'type': 'block', 'children': ['114']}; {'id': '114', 'type': 'return_statement', 'children': ['115']}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'string', 'children': [], 'value': '"/{}/senate/{{state}}/"'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '121', 'type': 'else_clause', 'children': ['122']}; {'id': '122', 'type': 'block', 'children': ['123']}; {'id': '123', 'type': 'return_statement', 'children': ['124']}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'string', 'children': [], 'value': '"/{}/senate/"'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '130', 'type': 'else_clause', 'children': ['131']}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'return_statement', 'children': ['133']}; {'id': '133', 'type': 'call', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'string', 'children': [], 'value': '"/{}/{{state}}/senate/"'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '139', 'type': 'else_clause', 'children': ['140']}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'if_statement', 'children': ['142', '145', '173']}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'jurisdiction'}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'if_statement', 'children': ['147', '156', '164']}; {'id': '147', 'type': 'comparison_operator', 'children': ['148', '153'], 'value': '=='}; {'id': '148', 'type': 'attribute', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'division_level'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'DivisionLevel'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'STATE'}; {'id': '156', 'type': 'block', 'children': ['157']}; {'id': '157', 'type': 'return_statement', 'children': ['158']}; {'id': '158', 'type': 'call', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'string', 'children': [], 'value': '"/{}/house/{{state}}/"'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '164', 'type': 'else_clause', 'children': ['165']}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'return_statement', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'string', 'children': [], 'value': '"/{}/house/"'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '173', 'type': 'else_clause', 'children': ['174']}; {'id': '174', 'type': 'block', 'children': ['175']}; {'id': '175', 'type': 'return_statement', 'children': ['176']}; {'id': '176', 'type': 'call', 'children': ['177', '180']}; {'id': '177', 'type': 'attribute', 'children': ['178', '179']}; {'id': '178', 'type': 'string', 'children': [], 'value': '"/{}/{{state}}/house/"'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '180', 'type': 'argument_list', 'children': ['181']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '182', 'type': 'elif_clause', 'children': ['183', '186']}; {'id': '183', 'type': 'comparison_operator', 'children': ['184', '185'], 'value': '=='}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'model_class'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'Division'}; {'id': '186', 'type': 'block', 'children': ['187']}; {'id': '187', 'type': 'return_statement', 'children': ['188']}; {'id': '188', 'type': 'call', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'string', 'children': [], 'value': '"/{}/{{state}}/"'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '192', 'type': 'argument_list', 'children': ['193']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'cycle'}; {'id': '194', 'type': 'else_clause', 'children': ['195']}; {'id': '195', 'type': 'block', 'children': ['196']}; {'id': '196', 'type': 'return_statement', 'children': ['197']}; {'id': '197', 'type': 'string', 'children': [], 'value': '"ORPHAN TYPE"'}
Returns the published URL template for a page type.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '14']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_annotate_fn_args'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '11']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'fn_opname'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '7', 'type': 'default_parameter', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '9', 'type': 'unary_operator', 'children': ['10'], 'value': '-'}; {'id': '10', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '11', 'type': 'default_parameter', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'consume_fn_name'}; {'id': '13', 'type': 'True', 'children': []}; {'id': '14', 'type': 'block', 'children': ['15', '19', '148', '342', '456']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'kwarg_names'}; {'id': '18', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '19', 'type': 'if_statement', 'children': ['20', '24']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '22'], 'value': '=='}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '22', 'type': 'unary_operator', 'children': ['23'], 'value': '-'}; {'id': '23', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'if_statement', 'children': ['26', '33', '48']}; {'id': '26', 'type': 'comparison_operator', 'children': ['27', '32'], 'value': '<'}; {'id': '27', 'type': 'subscript', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'version_info'}; {'id': '31', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '32', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'assignment', 'children': ['36', '39']}; {'id': '36', 'type': 'pattern_list', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '39', 'type': 'tuple', 'children': ['40', '43']}; {'id': '40', 'type': 'binary_operator', 'children': ['41', '42'], 'value': '%'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '42', 'type': 'integer', 'children': [], 'value': '256'}; {'id': '43', 'type': 'binary_operator', 'children': ['44', '47'], 'value': '//'}; {'id': '44', 'type': 'binary_operator', 'children': ['45', '46'], 'value': '*'}; {'id': '45', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '47', 'type': 'integer', 'children': [], 'value': '256'}; {'id': '48', 'type': 'else_clause', 'children': ['49']}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'if_statement', 'children': ['51', '54', '142']}; {'id': '51', 'type': 'comparison_operator', 'children': ['52', '53'], 'value': '=='}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'fn_opname'}; {'id': '53', 'type': 'string', 'children': [], 'value': "'CALL_FUNCTION_KW'"}; {'id': '54', 'type': 'block', 'children': ['55', '74', '91', '99', '111', '118', '125', '129']}; {'id': '55', 'type': 'if_statement', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'qj'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': '_DEBUG_QJ'}; {'id': '59', 'type': 'block', 'children': ['60']}; {'id': '60', 'type': 'assert_statement', 'children': ['61']}; {'id': '61', 'type': 'boolean_operator', 'children': ['62', '66'], 'value': 'and'}; {'id': '62', 'type': 'call', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '66', 'type': 'comparison_operator', 'children': ['67', '73'], 'value': '=='}; {'id': '67', 'type': 'attribute', 'children': ['68', '72']}; {'id': '68', 'type': 'subscript', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '70', 'type': 'unary_operator', 'children': ['71'], 'value': '-'}; {'id': '71', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '73', 'type': 'string', 'children': [], 'value': "'LOAD_CONST'"}; {'id': '74', 'type': 'if_statement', 'children': ['75', '89']}; {'id': '75', 'type': 'boolean_operator', 'children': ['76', '81'], 'value': 'or'}; {'id': '76', 'type': 'not_operator', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '81', 'type': 'comparison_operator', 'children': ['82', '88'], 'value': '!='}; {'id': '82', 'type': 'attribute', 'children': ['83', '87']}; {'id': '83', 'type': 'subscript', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '85', 'type': 'unary_operator', 'children': ['86'], 'value': '-'}; {'id': '86', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '88', 'type': 'string', 'children': [], 'value': "'LOAD_CONST'"}; {'id': '89', 'type': 'block', 'children': ['90']}; {'id': '90', 'type': 'return_statement', 'children': []}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '98', 'type': 'argument_list', 'children': []}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'kwarg_names'}; {'id': '102', 'type': 'subscript', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '106', 'type': 'slice', 'children': ['107', '108', '109']}; {'id': '107', 'type': 'colon', 'children': []}; {'id': '108', 'type': 'colon', 'children': []}; {'id': '109', 'type': 'unary_operator', 'children': ['110'], 'value': '-'}; {'id': '110', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'assignment', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '116', 'type': 'list', 'children': ['117'], 'value': "['']"}; {'id': '117', 'type': 'string', 'children': [], 'value': "''"}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'assignment', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '121', 'type': 'call', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'kwarg_names'}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'augmented_assignment', 'children': ['127', '128'], 'value': '-='}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '129', 'type': 'if_statement', 'children': ['130', '133']}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'qj'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': '_DEBUG_QJ'}; {'id': '133', 'type': 'block', 'children': ['134']}; {'id': '134', 'type': 'assert_statement', 'children': ['135']}; {'id': '135', 'type': 'boolean_operator', 'children': ['136', '139'], 'value': 'and'}; {'id': '136', 'type': 'comparison_operator', 'children': ['137', '138'], 'value': '>='}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '138', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '139', 'type': 'comparison_operator', 'children': ['140', '141'], 'value': '>'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '141', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '142', 'type': 'else_clause', 'children': ['143']}; {'id': '143', 'type': 'block', 'children': ['144']}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'assignment', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '147', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '148', 'type': 'for_statement', 'children': ['149', '150', '154']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '150', 'type': 'call', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '152', 'type': 'argument_list', 'children': ['153']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '154', 'type': 'block', 'children': ['155', '163', '189']}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'assignment', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '158', 'type': 'call', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '162', 'type': 'argument_list', 'children': []}; {'id': '163', 'type': 'if_statement', 'children': ['164', '187']}; {'id': '164', 'type': 'boolean_operator', 'children': ['165', '170'], 'value': 'and'}; {'id': '165', 'type': 'comparison_operator', 'children': ['166', '169'], 'value': '=='}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'stack_depth'}; {'id': '169', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '170', 'type': '()', 'children': ['171']}; {'id': '171', 'type': 'boolean_operator', 'children': ['172', '180'], 'value': 'or'}; {'id': '172', 'type': 'comparison_operator', 'children': ['173', '179'], 'value': '=='}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '179', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '180', 'type': 'comparison_operator', 'children': ['181', '186'], 'value': '=='}; {'id': '181', 'type': 'subscript', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '185', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '186', 'type': 'string', 'children': [], 'value': "''"}; {'id': '187', 'type': 'block', 'children': ['188']}; {'id': '188', 'type': 'continue_statement', 'children': []}; {'id': '189', 'type': 'if_statement', 'children': ['190', '203', '229']}; {'id': '190', 'type': 'boolean_operator', 'children': ['191', '196'], 'value': 'and'}; {'id': '191', 'type': 'comparison_operator', 'children': ['192', '195'], 'value': '=='}; {'id': '192', 'type': 'binary_operator', 'children': ['193', '194'], 'value': '%'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '194', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '195', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '196', 'type': 'comparison_operator', 'children': ['197', '202'], 'value': '<'}; {'id': '197', 'type': 'subscript', 'children': ['198', '201']}; {'id': '198', 'type': 'attribute', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'version_info'}; {'id': '201', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '202', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '203', 'type': 'block', 'children': ['204', '215']}; {'id': '204', 'type': 'if_statement', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'qj'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': '_DEBUG_QJ'}; {'id': '208', 'type': 'block', 'children': ['209']}; {'id': '209', 'type': 'assert_statement', 'children': ['210']}; {'id': '210', 'type': 'comparison_operator', 'children': ['211', '214'], 'value': '=='}; {'id': '211', 'type': 'attribute', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '214', 'type': 'string', 'children': [], 'value': "'LOAD_CONST'"}; {'id': '215', 'type': 'if_statement', 'children': ['216', '221']}; {'id': '216', 'type': 'comparison_operator', 'children': ['217', '220'], 'value': '=='}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '220', 'type': 'string', 'children': [], 'value': "'LOAD_CONST'"}; {'id': '221', 'type': 'block', 'children': ['222']}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'augmented_assignment', 'children': ['224', '227'], 'value': '+='}; {'id': '224', 'type': 'attribute', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '227', 'type': 'list', 'children': ['228'], 'value': "['=']"}; {'id': '228', 'type': 'string', 'children': [], 'value': "'='"}; {'id': '229', 'type': 'else_clause', 'children': ['230']}; {'id': '230', 'type': 'block', 'children': ['231', '235', '262', '286', '306']}; {'id': '231', 'type': 'expression_statement', 'children': ['232']}; {'id': '232', 'type': 'assignment', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '234', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '235', 'type': 'if_statement', 'children': ['236', '244']}; {'id': '236', 'type': 'call', 'children': ['237', '242']}; {'id': '237', 'type': 'attribute', 'children': ['238', '241']}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '242', 'type': 'argument_list', 'children': ['243']}; {'id': '243', 'type': 'string', 'children': [], 'value': "'CALL_FUNCTION'"}; {'id': '244', 'type': 'block', 'children': ['245']}; {'id': '245', 'type': 'expression_statement', 'children': ['246']}; {'id': '246', 'type': 'call', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': '_annotate_fn_args'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '253', '256', '259', '261']}; {'id': '249', 'type': 'subscript', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '251', 'type': 'slice', 'children': ['252']}; {'id': '252', 'type': 'colon', 'children': []}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '256', 'type': 'attribute', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'oparg'}; {'id': '259', 'type': 'unary_operator', 'children': ['260'], 'value': '-'}; {'id': '260', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '261', 'type': 'True', 'children': []}; {'id': '262', 'type': 'expression_statement', 'children': ['263']}; {'id': '263', 'type': 'assignment', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '265', 'type': 'call', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': '_collect_pops'}; {'id': '267', 'type': 'argument_list', 'children': ['268', '269', '284', '285']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '269', 'type': 'conditional_expression', 'children': ['270', '275', '283'], 'value': 'if'}; {'id': '270', 'type': 'binary_operator', 'children': ['271', '274'], 'value': '-'}; {'id': '271', 'type': 'attribute', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'stack_depth'}; {'id': '274', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '275', 'type': 'call', 'children': ['276', '281']}; {'id': '276', 'type': 'attribute', 'children': ['277', '280']}; {'id': '277', 'type': 'attribute', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '281', 'type': 'argument_list', 'children': ['282']}; {'id': '282', 'type': 'string', 'children': [], 'value': "'CALL_FUNCTION'"}; {'id': '283', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '284', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '285', 'type': 'False', 'children': []}; {'id': '286', 'type': 'if_statement', 'children': ['287', '295']}; {'id': '287', 'type': 'boolean_operator', 'children': ['288', '291'], 'value': 'and'}; {'id': '288', 'type': 'comparison_operator', 'children': ['289', '290'], 'value': '>'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '290', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '291', 'type': 'call', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '293', 'type': 'argument_list', 'children': ['294']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '295', 'type': 'block', 'children': ['296']}; {'id': '296', 'type': 'expression_statement', 'children': ['297']}; {'id': '297', 'type': 'augmented_assignment', 'children': ['298', '304'], 'value': '+='}; {'id': '298', 'type': 'attribute', 'children': ['299', '303']}; {'id': '299', 'type': 'subscript', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '301', 'type': 'unary_operator', 'children': ['302'], 'value': '-'}; {'id': '302', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '304', 'type': 'list', 'children': ['305'], 'value': "[',']"}; {'id': '305', 'type': 'string', 'children': [], 'value': "','"}; {'id': '306', 'type': 'if_statement', 'children': ['307', '314']}; {'id': '307', 'type': 'comparison_operator', 'children': ['308', '313'], 'value': '>='}; {'id': '308', 'type': 'subscript', 'children': ['309', '312']}; {'id': '309', 'type': 'attribute', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'version_info'}; {'id': '312', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '313', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '314', 'type': 'block', 'children': ['315', '328']}; {'id': '315', 'type': 'expression_statement', 'children': ['316']}; {'id': '316', 'type': 'assignment', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'target_se'}; {'id': '318', 'type': 'conditional_expression', 'children': ['319', '323', '327'], 'value': 'if'}; {'id': '319', 'type': 'subscript', 'children': ['320', '321']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '321', 'type': 'unary_operator', 'children': ['322'], 'value': '-'}; {'id': '322', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '323', 'type': 'call', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '325', 'type': 'argument_list', 'children': ['326']}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '328', 'type': 'expression_statement', 'children': ['329']}; {'id': '329', 'type': 'assignment', 'children': ['330', '333']}; {'id': '330', 'type': 'attribute', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'target_se'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '333', 'type': 'binary_operator', 'children': ['334', '339'], 'value': '+'}; {'id': '334', 'type': 'list', 'children': ['335', '338'], 'value': "[kwarg_names[i], '=']"}; {'id': '335', 'type': 'subscript', 'children': ['336', '337']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'kwarg_names'}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '338', 'type': 'string', 'children': [], 'value': "'='"}; {'id': '339', 'type': 'attribute', 'children': ['340', '341']}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'target_se'}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '342', 'type': 'for_statement', 'children': ['343', '344', '348']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '344', 'type': 'call', 'children': ['345', '346']}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '346', 'type': 'argument_list', 'children': ['347']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '348', 'type': 'block', 'children': ['349', '357']}; {'id': '349', 'type': 'expression_statement', 'children': ['350']}; {'id': '350', 'type': 'assignment', 'children': ['351', '352']}; {'id': '351', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '352', 'type': 'call', 'children': ['353', '356']}; {'id': '353', 'type': 'attribute', 'children': ['354', '355']}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '356', 'type': 'argument_list', 'children': []}; {'id': '357', 'type': 'if_statement', 'children': ['358', '366', '381', '417']}; {'id': '358', 'type': 'call', 'children': ['359', '364']}; {'id': '359', 'type': 'attribute', 'children': ['360', '363']}; {'id': '360', 'type': 'attribute', 'children': ['361', '362']}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '363', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '364', 'type': 'argument_list', 'children': ['365']}; {'id': '365', 'type': 'string', 'children': [], 'value': "'CALL_FUNCTION'"}; {'id': '366', 'type': 'block', 'children': ['367']}; {'id': '367', 'type': 'expression_statement', 'children': ['368']}; {'id': '368', 'type': 'call', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': '_annotate_fn_args'}; {'id': '370', 'type': 'argument_list', 'children': ['371', '372', '375', '378', '380']}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '372', 'type': 'attribute', 'children': ['373', '374']}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '374', 'type': 'identifier', 'children': [], 'value': 'opname'}; {'id': '375', 'type': 'attribute', 'children': ['376', '377']}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '377', 'type': 'identifier', 'children': [], 'value': 'oparg'}; {'id': '378', 'type': 'unary_operator', 'children': ['379'], 'value': '-'}; {'id': '379', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '380', 'type': 'True', 'children': []}; {'id': '381', 'type': 'elif_clause', 'children': ['382', '399']}; {'id': '382', 'type': 'boolean_operator', 'children': ['383', '389'], 'value': 'and'}; {'id': '383', 'type': 'call', 'children': ['384', '385']}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '385', 'type': 'argument_list', 'children': ['386']}; {'id': '386', 'type': 'attribute', 'children': ['387', '388']}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '388', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '389', 'type': 'comparison_operator', 'children': ['390', '395'], 'value': 'in'}; {'id': '390', 'type': 'subscript', 'children': ['391', '394']}; {'id': '391', 'type': 'attribute', 'children': ['392', '393']}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '393', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '394', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '395', 'type': 'set', 'children': ['396', '397', '398']}; {'id': '396', 'type': 'string', 'children': [], 'value': "']'"}; {'id': '397', 'type': 'string', 'children': [], 'value': "'}'"}; {'id': '398', 'type': 'string', 'children': [], 'value': "')'"}; {'id': '399', 'type': 'block', 'children': ['400']}; {'id': '400', 'type': 'if_statement', 'children': ['401', '409']}; {'id': '401', 'type': '()', 'children': ['402']}; {'id': '402', 'type': 'boolean_operator', 'children': ['403', '406'], 'value': 'or'}; {'id': '403', 'type': 'comparison_operator', 'children': ['404', '405'], 'value': '>'}; {'id': '404', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '405', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '406', 'type': 'comparison_operator', 'children': ['407', '408'], 'value': '>'}; {'id': '407', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '408', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '409', 'type': 'block', 'children': ['410']}; {'id': '410', 'type': 'expression_statement', 'children': ['411']}; {'id': '411', 'type': 'augmented_assignment', 'children': ['412', '415'], 'value': '+='}; {'id': '412', 'type': 'attribute', 'children': ['413', '414']}; {'id': '413', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '414', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '415', 'type': 'list', 'children': ['416'], 'value': "[',']"}; {'id': '416', 'type': 'string', 'children': [], 'value': "','"}; {'id': '417', 'type': 'else_clause', 'children': ['418']}; {'id': '418', 'type': 'block', 'children': ['419', '431']}; {'id': '419', 'type': 'expression_statement', 'children': ['420']}; {'id': '420', 'type': 'assignment', 'children': ['421', '422']}; {'id': '421', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '422', 'type': 'call', 'children': ['423', '424']}; {'id': '423', 'type': 'identifier', 'children': [], 'value': '_collect_pops'}; {'id': '424', 'type': 'argument_list', 'children': ['425', '426', '429', '430']}; {'id': '425', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '426', 'type': 'attribute', 'children': ['427', '428']}; {'id': '427', 'type': 'identifier', 'children': [], 'value': 'se'}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'stack_depth'}; {'id': '429', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '430', 'type': 'False', 'children': []}; {'id': '431', 'type': 'if_statement', 'children': ['432', '445']}; {'id': '432', 'type': 'boolean_operator', 'children': ['433', '441'], 'value': 'and'}; {'id': '433', 'type': '()', 'children': ['434']}; {'id': '434', 'type': 'boolean_operator', 'children': ['435', '438'], 'value': 'or'}; {'id': '435', 'type': 'comparison_operator', 'children': ['436', '437'], 'value': '>'}; {'id': '436', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '437', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '438', 'type': 'comparison_operator', 'children': ['439', '440'], 'value': '>'}; {'id': '439', 'type': 'identifier', 'children': [], 'value': 'nkw'}; {'id': '440', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '441', 'type': 'call', 'children': ['442', '443']}; {'id': '442', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '443', 'type': 'argument_list', 'children': ['444']}; {'id': '444', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '445', 'type': 'block', 'children': ['446']}; {'id': '446', 'type': 'expression_statement', 'children': ['447']}; {'id': '447', 'type': 'augmented_assignment', 'children': ['448', '454'], 'value': '+='}; {'id': '448', 'type': 'attribute', 'children': ['449', '453']}; {'id': '449', 'type': 'subscript', 'children': ['450', '451']}; {'id': '450', 'type': 'identifier', 'children': [], 'value': 'pops'}; {'id': '451', 'type': 'unary_operator', 'children': ['452'], 'value': '-'}; {'id': '452', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '453', 'type': 'identifier', 'children': [], 'value': 'oparg_repr'}; {'id': '454', 'type': 'list', 'children': ['455'], 'value': "[',']"}; {'id': '455', 'type': 'string', 'children': [], 'value': "','"}; {'id': '456', 'type': 'if_statement', 'children': ['457', '458']}; {'id': '457', 'type': 'identifier', 'children': [], 'value': 'consume_fn_name'}; {'id': '458', 'type': 'block', 'children': ['459']}; {'id': '459', 'type': 'expression_statement', 'children': ['460']}; {'id': '460', 'type': 'call', 'children': ['461', '462']}; {'id': '461', 'type': 'identifier', 'children': [], 'value': '_collect_pops'}; {'id': '462', 'type': 'argument_list', 'children': ['463', '464', '466', '467']}; {'id': '463', 'type': 'identifier', 'children': [], 'value': 'stack'}; {'id': '464', 'type': 'unary_operator', 'children': ['465'], 'value': '-'}; {'id': '465', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '466', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '467', 'type': 'False', 'children': []}
Add commas and equals as appropriate to function argument lists in the stack.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'tally_poll'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '26', '35', '45', '52', '63', '87', '104', '113', '130', '170', '176', '185', '211', '218', '226']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '11']}; {'id': '7', 'type': 'not_operator', 'children': ['8']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': ['13']}; {'id': '13', 'type': 'string', 'children': [], 'value': '"Syntax: !vote tally <pollnum>"'}; {'id': '14', 'type': 'if_statement', 'children': ['15', '23']}; {'id': '15', 'type': 'not_operator', 'children': ['16']}; {'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': 'args'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'isdigit'}; {'id': '22', 'type': 'argument_list', 'children': []}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'string', 'children': [], 'value': '"Not A Valid Positive Integer."'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'pid'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'poll'}; {'id': '38', 'type': 'call', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'get_open_poll'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '44']}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'pid'}; {'id': '45', 'type': 'if_statement', 'children': ['46', '49']}; {'id': '46', 'type': 'comparison_operator', 'children': ['47', '48'], 'value': 'is'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'poll'}; {'id': '48', 'type': 'None', 'children': []}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'return_statement', 'children': ['51']}; {'id': '51', 'type': 'string', 'children': [], 'value': '"That poll doesn\'t exist or was deleted. Use !poll list to see valid polls"'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '55', 'type': 'conditional_expression', 'children': ['56', '57', '62'], 'value': 'if'}; {'id': '56', 'type': 'string', 'children': [], 'value': '"Active"'}; {'id': '57', 'type': 'comparison_operator', 'children': ['58', '61'], 'value': '=='}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'poll'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'active'}; {'id': '61', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '62', 'type': 'string', 'children': [], 'value': '"Closed"'}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'votes'}; {'id': '66', 'type': 'call', 'children': ['67', '86']}; {'id': '67', 'type': 'attribute', 'children': ['68', '85']}; {'id': '68', 'type': 'call', 'children': ['69', '79']}; {'id': '69', 'type': 'attribute', 'children': ['70', '78']}; {'id': '70', 'type': 'call', 'children': ['71', '76']}; {'id': '71', 'type': 'attribute', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'Poll_responses'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '84'], 'value': '=='}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'Poll_responses'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'pid'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'pid'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'all'}; {'id': '86', 'type': 'argument_list', 'children': []}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'call', 'children': ['89', '92']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '92', 'type': 'argument_list', 'children': ['93']}; {'id': '93', 'type': 'binary_operator', 'children': ['94', '95'], 'value': '%'}; {'id': '94', 'type': 'string', 'children': [], 'value': '"%s poll: %s, %d total votes"'}; {'id': '95', 'type': 'tuple', 'children': ['96', '97', '100']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'state'}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'poll'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'question'}; {'id': '100', 'type': 'call', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'votes'}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'assignment', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '113', 'type': 'for_statement', 'children': ['114', '115', '116']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'votes'}; {'id': '116', 'type': 'block', 'children': ['117']}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'call', 'children': ['119', '126']}; {'id': '119', 'type': 'attribute', 'children': ['120', '125']}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'voter'}; {'id': '130', 'type': 'for_statement', 'children': ['131', '132', '140']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '132', 'type': 'call', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'call', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '139', 'type': 'argument_list', 'children': []}; {'id': '140', 'type': 'block', 'children': ['141']}; {'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': 'args'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'send'}; {'id': '146', 'type': 'argument_list', 'children': ['147', '165']}; {'id': '147', 'type': 'binary_operator', 'children': ['148', '149'], 'value': '%'}; {'id': '148', 'type': 'string', 'children': [], 'value': '"%s: %d -- %s"'}; {'id': '149', 'type': 'tuple', 'children': ['150', '151', '157']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '151', 'type': 'call', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '153', 'type': 'argument_list', 'children': ['154']}; {'id': '154', 'type': 'subscript', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '157', 'type': 'call', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'string', 'children': [], 'value': '", "'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'subscript', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '165', 'type': 'keyword_argument', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'nick'}; {'id': '170', 'type': 'if_statement', 'children': ['171', '173']}; {'id': '171', 'type': 'not_operator', 'children': ['172']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '173', 'type': 'block', 'children': ['174']}; {'id': '174', 'type': 'return_statement', 'children': ['175']}; {'id': '175', 'type': 'string', 'children': [], 'value': '""'}; {'id': '176', 'type': 'expression_statement', 'children': ['177']}; {'id': '177', 'type': 'assignment', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'ranking'}; {'id': '179', 'type': 'call', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '183', 'type': 'argument_list', 'children': ['184']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '185', 'type': 'for_statement', 'children': ['186', '187', '192']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '187', 'type': 'call', 'children': ['188', '191']}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '191', 'type': 'argument_list', 'children': []}; {'id': '192', 'type': 'block', 'children': ['193', '202']}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '196', 'type': 'call', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '198', 'type': 'argument_list', 'children': ['199']}; {'id': '199', 'type': 'subscript', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'votemap'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'call', 'children': ['204', '209']}; {'id': '204', 'type': 'attribute', 'children': ['205', '208']}; {'id': '205', 'type': 'subscript', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'ranking'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'num'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '209', 'type': 'argument_list', 'children': ['210']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '211', 'type': 'expression_statement', 'children': ['212']}; {'id': '212', 'type': 'assignment', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'high'}; {'id': '214', 'type': 'call', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'max'}; {'id': '216', 'type': 'argument_list', 'children': ['217']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'ranking'}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'assignment', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '221', 'type': 'tuple', 'children': ['222', '225']}; {'id': '222', 'type': 'subscript', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'ranking'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'high'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'high'}; {'id': '226', 'type': 'if_statement', 'children': ['227', '235', '250']}; {'id': '227', 'type': 'comparison_operator', 'children': ['228', '234'], 'value': '=='}; {'id': '228', 'type': 'call', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'subscript', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '233', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '234', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '235', 'type': 'block', 'children': ['236', '246']}; {'id': '236', 'type': 'expression_statement', 'children': ['237']}; {'id': '237', 'type': 'assignment', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '239', 'type': 'tuple', 'children': ['240', '245']}; {'id': '240', 'type': 'subscript', 'children': ['241', '244']}; {'id': '241', 'type': 'subscript', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '243', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '244', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'high'}; {'id': '246', 'type': 'return_statement', 'children': ['247']}; {'id': '247', 'type': 'binary_operator', 'children': ['248', '249'], 'value': '%'}; {'id': '248', 'type': 'string', 'children': [], 'value': '"The winner is %s with %d votes."'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '250', 'type': 'else_clause', 'children': ['251']}; {'id': '251', 'type': 'block', 'children': ['252', '265']}; {'id': '252', 'type': 'expression_statement', 'children': ['253']}; {'id': '253', 'type': 'assignment', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '255', 'type': 'tuple', 'children': ['256', '264']}; {'id': '256', 'type': 'call', 'children': ['257', '260']}; {'id': '257', 'type': 'attribute', 'children': ['258', '259']}; {'id': '258', 'type': 'string', 'children': [], 'value': '", "'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '260', 'type': 'argument_list', 'children': ['261']}; {'id': '261', 'type': 'subscript', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'winners'}; {'id': '263', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'high'}; {'id': '265', 'type': 'return_statement', 'children': ['266']}; {'id': '266', 'type': 'binary_operator', 'children': ['267', '268'], 'value': '%'}; {'id': '267', 'type': 'string', 'children': [], 'value': '"Tie between %s with %d votes."'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'winners'}
Shows the results of poll.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'replace_u_end_day'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '7', 'type': 'block', 'children': ['8', '17', '24', '36', '58', '75', '109', '128', '152']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'lstrip'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': "'-'"}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '20', 'type': 'call', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'lstrip'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'string', 'children': [], 'value': "'-'"}; {'id': '36', 'type': 'if_statement', 'children': ['37', '44']}; {'id': '37', 'type': 'boolean_operator', 'children': ['38', '41'], 'value': 'or'}; {'id': '38', 'type': 'comparison_operator', 'children': ['39', '40'], 'value': '=='}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '40', 'type': 'string', 'children': [], 'value': "'uu'"}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': '=='}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '43', 'type': 'string', 'children': [], 'value': "'3u'"}; {'id': '44', 'type': 'block', 'children': ['45']}; {'id': '45', 'type': 'return_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'subscript', 'children': ['50', '57']}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'calendar'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'monthrange'}; {'id': '54', 'type': 'argument_list', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '57', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '58', 'type': 'if_statement', 'children': ['59', '66']}; {'id': '59', 'type': 'boolean_operator', 'children': ['60', '63'], 'value': 'or'}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '62'], 'value': '=='}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '62', 'type': 'string', 'children': [], 'value': "'0u'"}; {'id': '63', 'type': 'comparison_operator', 'children': ['64', '65'], 'value': '=='}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '65', 'type': 'string', 'children': [], 'value': "'1u'"}; {'id': '66', 'type': 'block', 'children': ['67']}; {'id': '67', 'type': 'return_statement', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '72', 'type': 'argument_list', 'children': ['73', '74']}; {'id': '73', 'type': 'string', 'children': [], 'value': "'u'"}; {'id': '74', 'type': 'string', 'children': [], 'value': "'9'"}; {'id': '75', 'type': 'if_statement', 'children': ['76', '83']}; {'id': '76', 'type': 'boolean_operator', 'children': ['77', '80'], 'value': 'or'}; {'id': '77', 'type': 'comparison_operator', 'children': ['78', '79'], 'value': '=='}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '79', 'type': 'string', 'children': [], 'value': "'2u'"}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '82'], 'value': '=='}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '82', 'type': 'string', 'children': [], 'value': "'u9'"}; {'id': '83', 'type': 'block', 'children': ['84']}; {'id': '84', 'type': 'if_statement', 'children': ['85', '95', '98', '105']}; {'id': '85', 'type': 'boolean_operator', 'children': ['86', '89'], 'value': 'or'}; {'id': '86', 'type': 'comparison_operator', 'children': ['87', '88'], 'value': '!='}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '88', 'type': 'string', 'children': [], 'value': "'02'"}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'calendar'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'isleap'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '95', 'type': 'block', 'children': ['96']}; {'id': '96', 'type': 'return_statement', 'children': ['97']}; {'id': '97', 'type': 'string', 'children': [], 'value': "'29'"}; {'id': '98', 'type': 'elif_clause', 'children': ['99', '102']}; {'id': '99', 'type': 'comparison_operator', 'children': ['100', '101'], 'value': '=='}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '101', 'type': 'string', 'children': [], 'value': "'2u'"}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'return_statement', 'children': ['104']}; {'id': '104', 'type': 'string', 'children': [], 'value': "'28'"}; {'id': '105', 'type': 'else_clause', 'children': ['106']}; {'id': '106', 'type': 'block', 'children': ['107']}; {'id': '107', 'type': 'return_statement', 'children': ['108']}; {'id': '108', 'type': 'string', 'children': [], 'value': "'19'"}; {'id': '109', 'type': 'if_statement', 'children': ['110', '119']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112', '118'], 'value': '<'}; {'id': '111', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '112', 'type': 'call', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '114', 'type': 'argument_list', 'children': ['115']}; {'id': '115', 'type': 'subscript', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '117', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '118', 'type': 'integer', 'children': [], 'value': '9'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'return_statement', 'children': ['121']}; {'id': '121', 'type': 'call', 'children': ['122', '125']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '125', 'type': 'argument_list', 'children': ['126', '127']}; {'id': '126', 'type': 'string', 'children': [], 'value': "'u'"}; {'id': '127', 'type': 'string', 'children': [], 'value': "'2'"}; {'id': '128', 'type': 'if_statement', 'children': ['129', '132']}; {'id': '129', 'type': 'comparison_operator', 'children': ['130', '131'], 'value': '=='}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '131', 'type': 'string', 'children': [], 'value': "'u1'"}; {'id': '132', 'type': 'block', 'children': ['133']}; {'id': '133', 'type': 'if_statement', 'children': ['134', '145', '148']}; {'id': '134', 'type': 'comparison_operator', 'children': ['135', '144'], 'value': '=='}; {'id': '135', 'type': 'subscript', 'children': ['136', '143']}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'calendar'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'monthrange'}; {'id': '140', 'type': 'argument_list', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '143', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '144', 'type': 'integer', 'children': [], 'value': '31'}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'return_statement', 'children': ['147']}; {'id': '147', 'type': 'string', 'children': [], 'value': "'31'"}; {'id': '148', 'type': 'else_clause', 'children': ['149']}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'return_statement', 'children': ['151']}; {'id': '151', 'type': 'string', 'children': [], 'value': "'21'"}; {'id': '152', 'type': 'if_statement', 'children': ['153', '156', '172']}; {'id': '153', 'type': 'comparison_operator', 'children': ['154', '155'], 'value': '=='}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'day'}; {'id': '155', 'type': 'string', 'children': [], 'value': "'u0'"}; {'id': '156', 'type': 'block', 'children': ['157']}; {'id': '157', 'type': 'if_statement', 'children': ['158', '169']}; {'id': '158', 'type': 'comparison_operator', 'children': ['159', '168'], 'value': '>='}; {'id': '159', 'type': 'subscript', 'children': ['160', '167']}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'calendar'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'monthrange'}; {'id': '164', 'type': 'argument_list', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'year'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'month'}; {'id': '167', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '168', 'type': 'integer', 'children': [], 'value': '30'}; {'id': '169', 'type': 'block', 'children': ['170']}; {'id': '170', 'type': 'return_statement', 'children': ['171']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'30'"}; {'id': '172', 'type': 'else_clause', 'children': ['173']}; {'id': '173', 'type': 'block', 'children': ['174']}; {'id': '174', 'type': 'return_statement', 'children': ['175']}; {'id': '175', 'type': 'string', 'children': [], 'value': "'20'"}
Find the latest legitimate day.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'zero_year_special_case'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '17', '240', '251']}; {'id': '10', 'type': 'boolean_operator', 'children': ['11', '14'], 'value': 'and'}; {'id': '11', 'type': 'comparison_operator', 'children': ['12', '13'], 'value': '=='}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '13', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '14', 'type': 'comparison_operator', 'children': ['15', '16'], 'value': '=='}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '16', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '17', 'type': 'block', 'children': ['18', '36', '54']}; {'id': '18', 'type': 'if_statement', 'children': ['19', '33']}; {'id': '19', 'type': 'boolean_operator', 'children': ['20', '26'], 'value': 'and'}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '26', 'type': 'not_operator', 'children': ['27']}; {'id': '27', 'type': 'call', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'return_statement', 'children': ['35']}; {'id': '35', 'type': 'True', 'children': []}; {'id': '36', 'type': 'if_statement', 'children': ['37', '51']}; {'id': '37', 'type': 'boolean_operator', 'children': ['38', '45'], 'value': 'and'}; {'id': '38', 'type': 'not_operator', 'children': ['39']}; {'id': '39', 'type': 'call', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '43', 'type': 'argument_list', 'children': ['44']}; {'id': '44', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '45', 'type': 'call', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'return_statement', 'children': ['53']}; {'id': '53', 'type': 'False', 'children': []}; {'id': '54', 'type': 'if_statement', 'children': ['55', '68']}; {'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': 'from_date'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '60', 'type': 'argument_list', 'children': ['61']}; {'id': '61', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '62', 'type': 'call', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '66', 'type': 'argument_list', 'children': ['67']}; {'id': '67', 'type': 'string', 'children': [], 'value': "'0000'"}; {'id': '68', 'type': 'block', 'children': ['69', '141', '213', '220']}; {'id': '69', 'type': 'if_statement', 'children': ['70', '76', '85', '109']}; {'id': '70', 'type': 'comparison_operator', 'children': ['71', '75'], 'value': '=='}; {'id': '71', 'type': 'call', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '75', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '82']}; {'id': '79', 'type': 'pattern_list', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'fm'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'fd'}; {'id': '82', 'type': 'expression_list', 'children': ['83', '84']}; {'id': '83', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '84', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '85', 'type': 'elif_clause', 'children': ['86', '92']}; {'id': '86', 'type': 'comparison_operator', 'children': ['87', '91'], 'value': '=='}; {'id': '87', 'type': 'call', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '91', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'assignment', 'children': ['95', '98']}; {'id': '95', 'type': 'pattern_list', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'fm'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'fd'}; {'id': '98', 'type': 'expression_list', 'children': ['99', '108']}; {'id': '99', 'type': 'call', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '104', 'type': 'slice', 'children': ['105', '106', '107']}; {'id': '105', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '106', 'type': 'colon', 'children': []}; {'id': '107', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '108', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '109', 'type': 'elif_clause', 'children': ['110', '116']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '115'], 'value': '=='}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '115', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '116', 'type': 'block', 'children': ['117']}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'assignment', 'children': ['119', '122']}; {'id': '119', 'type': 'pattern_list', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'fm'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'fd'}; {'id': '122', 'type': 'expression_list', 'children': ['123', '132']}; {'id': '123', 'type': 'call', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '125', 'type': 'argument_list', 'children': ['126']}; {'id': '126', 'type': 'subscript', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '128', 'type': 'slice', 'children': ['129', '130', '131']}; {'id': '129', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '130', 'type': 'colon', 'children': []}; {'id': '131', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '132', 'type': 'call', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'subscript', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '137', 'type': 'slice', 'children': ['138', '139', '140']}; {'id': '138', 'type': 'integer', 'children': [], 'value': '8'}; {'id': '139', 'type': 'colon', 'children': []}; {'id': '140', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '141', 'type': 'if_statement', 'children': ['142', '148', '157', '181']}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '147'], 'value': '=='}; {'id': '143', 'type': 'call', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '145', 'type': 'argument_list', 'children': ['146']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '147', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '148', 'type': 'block', 'children': ['149']}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'assignment', 'children': ['151', '154']}; {'id': '151', 'type': 'pattern_list', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'tm'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'td'}; {'id': '154', 'type': 'expression_list', 'children': ['155', '156']}; {'id': '155', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '156', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '157', 'type': 'elif_clause', 'children': ['158', '164']}; {'id': '158', 'type': 'comparison_operator', 'children': ['159', '163'], 'value': '=='}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '163', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '164', 'type': 'block', 'children': ['165']}; {'id': '165', 'type': 'expression_statement', 'children': ['166']}; {'id': '166', 'type': 'assignment', 'children': ['167', '170']}; {'id': '167', 'type': 'pattern_list', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'tm'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'td'}; {'id': '170', 'type': 'expression_list', 'children': ['171', '180']}; {'id': '171', 'type': 'call', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'subscript', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '176', 'type': 'slice', 'children': ['177', '178', '179']}; {'id': '177', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '178', 'type': 'colon', 'children': []}; {'id': '179', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '180', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '181', 'type': 'elif_clause', 'children': ['182', '188']}; {'id': '182', 'type': 'comparison_operator', 'children': ['183', '187'], 'value': '=='}; {'id': '183', 'type': 'call', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '187', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '188', 'type': 'block', 'children': ['189']}; {'id': '189', 'type': 'expression_statement', 'children': ['190']}; {'id': '190', 'type': 'assignment', 'children': ['191', '194']}; {'id': '191', 'type': 'pattern_list', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'tm'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'td'}; {'id': '194', 'type': 'expression_list', 'children': ['195', '204']}; {'id': '195', 'type': 'call', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '197', 'type': 'argument_list', 'children': ['198']}; {'id': '198', 'type': 'subscript', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '200', 'type': 'slice', 'children': ['201', '202', '203']}; {'id': '201', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '202', 'type': 'colon', 'children': []}; {'id': '203', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '204', 'type': 'call', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '206', 'type': 'argument_list', 'children': ['207']}; {'id': '207', 'type': 'subscript', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '209', 'type': 'slice', 'children': ['210', '211', '212']}; {'id': '210', 'type': 'integer', 'children': [], 'value': '8'}; {'id': '211', 'type': 'colon', 'children': []}; {'id': '212', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '213', 'type': 'if_statement', 'children': ['214', '217']}; {'id': '214', 'type': 'comparison_operator', 'children': ['215', '216'], 'value': '=='}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '217', 'type': 'block', 'children': ['218']}; {'id': '218', 'type': 'return_statement', 'children': ['219']}; {'id': '219', 'type': 'True', 'children': []}; {'id': '220', 'type': 'if_statement', 'children': ['221', '224', '236']}; {'id': '221', 'type': 'comparison_operator', 'children': ['222', '223'], 'value': '<='}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'fm'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'tm'}; {'id': '224', 'type': 'block', 'children': ['225']}; {'id': '225', 'type': 'if_statement', 'children': ['226', '229', '232']}; {'id': '226', 'type': 'comparison_operator', 'children': ['227', '228'], 'value': '<='}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'fd'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'td'}; {'id': '229', 'type': 'block', 'children': ['230']}; {'id': '230', 'type': 'return_statement', 'children': ['231']}; {'id': '231', 'type': 'True', 'children': []}; {'id': '232', 'type': 'else_clause', 'children': ['233']}; {'id': '233', 'type': 'block', 'children': ['234']}; {'id': '234', 'type': 'return_statement', 'children': ['235']}; {'id': '235', 'type': 'False', 'children': []}; {'id': '236', 'type': 'else_clause', 'children': ['237']}; {'id': '237', 'type': 'block', 'children': ['238']}; {'id': '238', 'type': 'return_statement', 'children': ['239']}; {'id': '239', 'type': 'False', 'children': []}; {'id': '240', 'type': 'elif_clause', 'children': ['241', '248']}; {'id': '241', 'type': 'boolean_operator', 'children': ['242', '245'], 'value': 'and'}; {'id': '242', 'type': 'comparison_operator', 'children': ['243', '244'], 'value': '=='}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '244', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '245', 'type': 'comparison_operator', 'children': ['246', '247'], 'value': '=='}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '247', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '248', 'type': 'block', 'children': ['249']}; {'id': '249', 'type': 'return_statement', 'children': ['250']}; {'id': '250', 'type': 'False', 'children': []}; {'id': '251', 'type': 'elif_clause', 'children': ['252', '259']}; {'id': '252', 'type': 'boolean_operator', 'children': ['253', '256'], 'value': 'and'}; {'id': '253', 'type': 'comparison_operator', 'children': ['254', '255'], 'value': '=='}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '255', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '256', 'type': 'comparison_operator', 'children': ['257', '258'], 'value': '=='}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '258', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '259', 'type': 'block', 'children': ['260']}; {'id': '260', 'type': 'if_statement', 'children': ['261', '267', '270']}; {'id': '261', 'type': 'call', 'children': ['262', '265']}; {'id': '262', 'type': 'attribute', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '265', 'type': 'argument_list', 'children': ['266']}; {'id': '266', 'type': 'string', 'children': [], 'value': '"0000"'}; {'id': '267', 'type': 'block', 'children': ['268']}; {'id': '268', 'type': 'return_statement', 'children': ['269']}; {'id': '269', 'type': 'False', 'children': []}; {'id': '270', 'type': 'else_clause', 'children': ['271']}; {'id': '271', 'type': 'block', 'children': ['272']}; {'id': '272', 'type': 'return_statement', 'children': ['273']}; {'id': '273', 'type': 'True', 'children': []}
strptime does not resolve a 0000 year, we must handle this.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'is_valid_interval'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '14', '22']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '9', 'type': 'None', 'children': []}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '13', 'type': 'None', 'children': []}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '19']}; {'id': '16', 'type': 'pattern_list', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '19', 'type': 'expression_list', 'children': ['20', '21']}; {'id': '20', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '21', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '22', 'type': 'if_statement', 'children': ['23', '31', '427']}; {'id': '23', 'type': 'comparison_operator', 'children': ['24', '30'], 'value': '=='}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '30', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '31', 'type': 'block', 'children': ['32', '40', '51', '60', '86', '112', '123', '154', '180', '206', '232', '258', '305', '350']}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '35', 'type': 'call', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'replace_all'}; {'id': '37', 'type': 'argument_list', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'interval_replacements'}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '47', 'type': 'argument_list', 'children': ['48', '49', '50']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'U_PATTERN'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'replace_u'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '54', 'type': 'call', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'edtf_candidate'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '60', 'type': 'if_statement', 'children': ['61', '69']}; {'id': '61', 'type': 'call', 'children': ['62', '67']}; {'id': '62', 'type': 'attribute', 'children': ['63', '66']}; {'id': '63', 'type': 'subscript', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '65', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '69', 'type': 'block', 'children': ['70', '74']}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'assignment', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '73', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '79']}; {'id': '76', 'type': 'subscript', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '78', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '79', 'type': 'subscript', 'children': ['80', '83']}; {'id': '80', 'type': 'subscript', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '82', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '83', 'type': 'slice', 'children': ['84', '85']}; {'id': '84', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '85', 'type': 'colon', 'children': []}; {'id': '86', 'type': 'if_statement', 'children': ['87', '95']}; {'id': '87', 'type': 'call', 'children': ['88', '93']}; {'id': '88', 'type': 'attribute', 'children': ['89', '92']}; {'id': '89', 'type': 'subscript', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '91', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '95', 'type': 'block', 'children': ['96', '100']}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'assignment', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '99', 'type': 'string', 'children': [], 'value': "'neg'"}; {'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': 'parts'}; {'id': '104', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '105', 'type': 'subscript', 'children': ['106', '109']}; {'id': '106', 'type': 'subscript', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '108', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '109', 'type': 'slice', 'children': ['110', '111']}; {'id': '110', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '111', 'type': 'colon', 'children': []}; {'id': '112', 'type': 'if_statement', 'children': ['113', '120']}; {'id': '113', 'type': 'boolean_operator', 'children': ['114', '117'], 'value': 'and'}; {'id': '114', 'type': 'comparison_operator', 'children': ['115', '116'], 'value': '=='}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '116', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '117', 'type': 'comparison_operator', 'children': ['118', '119'], 'value': '=='}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '119', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '120', 'type': 'block', 'children': ['121']}; {'id': '121', 'type': 'return_statement', 'children': ['122']}; {'id': '122', 'type': 'False', 'children': []}; {'id': '123', 'type': 'if_statement', 'children': ['124', '141']}; {'id': '124', 'type': 'boolean_operator', 'children': ['125', '133'], 'value': 'or'}; {'id': '125', 'type': 'call', 'children': ['126', '131']}; {'id': '126', 'type': 'attribute', 'children': ['127', '130']}; {'id': '127', 'type': 'subscript', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '129', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'string', 'children': [], 'value': '"0000"'}; {'id': '133', 'type': 'call', 'children': ['134', '139']}; {'id': '134', 'type': 'attribute', 'children': ['135', '138']}; {'id': '135', 'type': 'subscript', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '137', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'string', 'children': [], 'value': '"0000"'}; {'id': '141', 'type': 'block', 'children': ['142']}; {'id': '142', 'type': 'return_statement', 'children': ['143']}; {'id': '143', 'type': 'call', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'zero_year_special_case'}; {'id': '145', 'type': 'argument_list', 'children': ['146', '149', '152', '153']}; {'id': '146', 'type': 'subscript', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '148', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '149', 'type': 'subscript', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '151', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '154', 'type': 'if_statement', 'children': ['155', '165']}; {'id': '155', 'type': 'comparison_operator', 'children': ['156', '164'], 'value': '=='}; {'id': '156', 'type': 'call', 'children': ['157', '162']}; {'id': '157', 'type': 'attribute', 'children': ['158', '161']}; {'id': '158', 'type': 'subscript', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '160', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '164', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'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': 'datetime'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '175', 'type': 'argument_list', 'children': ['176', '179']}; {'id': '176', 'type': 'subscript', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '178', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '179', 'type': 'string', 'children': [], 'value': '"%Y-%m-%d"'}; {'id': '180', 'type': 'if_statement', 'children': ['181', '191']}; {'id': '181', 'type': 'comparison_operator', 'children': ['182', '190'], 'value': '=='}; {'id': '182', 'type': 'call', 'children': ['183', '188']}; {'id': '183', 'type': 'attribute', 'children': ['184', '187']}; {'id': '184', 'type': 'subscript', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '186', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '188', 'type': 'argument_list', 'children': ['189']}; {'id': '189', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '190', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '191', 'type': 'block', 'children': ['192']}; {'id': '192', 'type': 'expression_statement', 'children': ['193']}; {'id': '193', 'type': 'assignment', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '195', 'type': 'call', 'children': ['196', '201']}; {'id': '196', 'type': 'attribute', 'children': ['197', '200']}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '201', 'type': 'argument_list', 'children': ['202', '205']}; {'id': '202', 'type': 'subscript', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '204', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '205', 'type': 'string', 'children': [], 'value': '"%Y-%m-%d"'}; {'id': '206', 'type': 'if_statement', 'children': ['207', '217']}; {'id': '207', 'type': 'comparison_operator', 'children': ['208', '216'], 'value': '=='}; {'id': '208', 'type': 'call', 'children': ['209', '214']}; {'id': '209', 'type': 'attribute', 'children': ['210', '213']}; {'id': '210', 'type': 'subscript', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '212', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '214', 'type': 'argument_list', 'children': ['215']}; {'id': '215', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '216', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '217', 'type': 'block', 'children': ['218']}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'assignment', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '221', 'type': 'call', 'children': ['222', '227']}; {'id': '222', 'type': 'attribute', 'children': ['223', '226']}; {'id': '223', 'type': 'attribute', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '227', 'type': 'argument_list', 'children': ['228', '231']}; {'id': '228', 'type': 'subscript', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '230', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '231', 'type': 'string', 'children': [], 'value': '"%Y-%m"'}; {'id': '232', 'type': 'if_statement', 'children': ['233', '243']}; {'id': '233', 'type': 'comparison_operator', 'children': ['234', '242'], 'value': '=='}; {'id': '234', 'type': 'call', 'children': ['235', '240']}; {'id': '235', 'type': 'attribute', 'children': ['236', '239']}; {'id': '236', 'type': 'subscript', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '238', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '240', 'type': 'argument_list', 'children': ['241']}; {'id': '241', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '242', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '243', 'type': 'block', 'children': ['244']}; {'id': '244', 'type': 'expression_statement', 'children': ['245']}; {'id': '245', 'type': 'assignment', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '247', 'type': 'call', 'children': ['248', '253']}; {'id': '248', 'type': 'attribute', 'children': ['249', '252']}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '253', 'type': 'argument_list', 'children': ['254', '257']}; {'id': '254', 'type': 'subscript', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '256', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '257', 'type': 'string', 'children': [], 'value': '"%Y-%m"'}; {'id': '258', 'type': 'if_statement', 'children': ['259', '269']}; {'id': '259', 'type': 'comparison_operator', 'children': ['260', '268'], 'value': '=='}; {'id': '260', 'type': 'call', 'children': ['261', '266']}; {'id': '261', 'type': 'attribute', 'children': ['262', '265']}; {'id': '262', 'type': 'subscript', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '264', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '266', 'type': 'argument_list', 'children': ['267']}; {'id': '267', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '268', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '269', 'type': 'block', 'children': ['270']}; {'id': '270', 'type': 'if_statement', 'children': ['271', '276', '289']}; {'id': '271', 'type': 'comparison_operator', 'children': ['272', '275'], 'value': '=='}; {'id': '272', 'type': 'subscript', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '274', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '275', 'type': 'string', 'children': [], 'value': "'unknown'"}; {'id': '276', 'type': 'block', 'children': ['277']}; {'id': '277', 'type': 'expression_statement', 'children': ['278']}; {'id': '278', 'type': 'assignment', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '280', 'type': 'call', 'children': ['281', '286']}; {'id': '281', 'type': 'attribute', 'children': ['282', '285']}; {'id': '282', 'type': 'attribute', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '286', 'type': 'argument_list', 'children': ['287', '288']}; {'id': '287', 'type': 'string', 'children': [], 'value': '"0001"'}; {'id': '288', 'type': 'string', 'children': [], 'value': '"%Y"'}; {'id': '289', 'type': 'else_clause', 'children': ['290']}; {'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': 'from_date'}; {'id': '294', 'type': 'call', 'children': ['295', '300']}; {'id': '295', 'type': 'attribute', 'children': ['296', '299']}; {'id': '296', 'type': 'attribute', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '300', 'type': 'argument_list', 'children': ['301', '304']}; {'id': '301', 'type': 'subscript', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '303', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '304', 'type': 'string', 'children': [], 'value': '"%Y"'}; {'id': '305', 'type': 'if_statement', 'children': ['306', '316']}; {'id': '306', 'type': 'comparison_operator', 'children': ['307', '315'], 'value': '=='}; {'id': '307', 'type': 'call', 'children': ['308', '313']}; {'id': '308', 'type': 'attribute', 'children': ['309', '312']}; {'id': '309', 'type': 'subscript', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '311', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '313', 'type': 'argument_list', 'children': ['314']}; {'id': '314', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '315', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '316', 'type': 'block', 'children': ['317']}; {'id': '317', 'type': 'if_statement', 'children': ['318', '329', '334']}; {'id': '318', 'type': 'boolean_operator', 'children': ['319', '324'], 'value': 'or'}; {'id': '319', 'type': 'comparison_operator', 'children': ['320', '323'], 'value': '=='}; {'id': '320', 'type': 'subscript', 'children': ['321', '322']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '322', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '323', 'type': 'string', 'children': [], 'value': "'open'"}; {'id': '324', 'type': 'comparison_operator', 'children': ['325', '328'], 'value': '=='}; {'id': '325', 'type': 'subscript', 'children': ['326', '327']}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '327', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '328', 'type': 'string', 'children': [], 'value': "'unknown'"}; {'id': '329', 'type': 'block', 'children': ['330']}; {'id': '330', 'type': 'expression_statement', 'children': ['331']}; {'id': '331', 'type': 'assignment', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '333', 'type': 'string', 'children': [], 'value': "'open'"}; {'id': '334', 'type': 'else_clause', 'children': ['335']}; {'id': '335', 'type': 'block', 'children': ['336']}; {'id': '336', 'type': 'expression_statement', 'children': ['337']}; {'id': '337', 'type': 'assignment', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '339', 'type': 'call', 'children': ['340', '345']}; {'id': '340', 'type': 'attribute', 'children': ['341', '344']}; {'id': '341', 'type': 'attribute', 'children': ['342', '343']}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'strptime'}; {'id': '345', 'type': 'argument_list', 'children': ['346', '349']}; {'id': '346', 'type': 'subscript', 'children': ['347', '348']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '348', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '349', 'type': 'string', 'children': [], 'value': '"%Y"'}; {'id': '350', 'type': 'if_statement', 'children': ['351', '358', '361', '381', '403', '423']}; {'id': '351', 'type': 'boolean_operator', 'children': ['352', '355'], 'value': 'and'}; {'id': '352', 'type': 'comparison_operator', 'children': ['353', '354'], 'value': '=='}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '354', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '355', 'type': 'comparison_operator', 'children': ['356', '357'], 'value': '=='}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '357', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '358', 'type': 'block', 'children': ['359']}; {'id': '359', 'type': 'return_statement', 'children': ['360']}; {'id': '360', 'type': 'True', 'children': []}; {'id': '361', 'type': 'elif_clause', 'children': ['362', '369']}; {'id': '362', 'type': 'boolean_operator', 'children': ['363', '366'], 'value': 'and'}; {'id': '363', 'type': 'comparison_operator', 'children': ['364', '365'], 'value': '=='}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '365', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '366', 'type': 'comparison_operator', 'children': ['367', '368'], 'value': '=='}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '368', 'type': 'string', 'children': [], 'value': "'neg'"}; {'id': '369', 'type': 'block', 'children': ['370']}; {'id': '370', 'type': 'if_statement', 'children': ['371', '378']}; {'id': '371', 'type': 'boolean_operator', 'children': ['372', '377'], 'value': 'and'}; {'id': '372', 'type': 'boolean_operator', 'children': ['373', '376'], 'value': 'and'}; {'id': '373', 'type': 'comparison_operator', 'children': ['374', '375'], 'value': '>='}; {'id': '374', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '377', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '378', 'type': 'block', 'children': ['379']}; {'id': '379', 'type': 'return_statement', 'children': ['380']}; {'id': '380', 'type': 'True', 'children': []}; {'id': '381', 'type': 'elif_clause', 'children': ['382', '400']}; {'id': '382', 'type': '()', 'children': ['383']}; {'id': '383', 'type': 'boolean_operator', 'children': ['384', '395'], 'value': 'or'}; {'id': '384', 'type': 'boolean_operator', 'children': ['385', '390'], 'value': 'or'}; {'id': '385', 'type': 'comparison_operator', 'children': ['386', '389'], 'value': '=='}; {'id': '386', 'type': 'subscript', 'children': ['387', '388']}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '388', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '389', 'type': 'string', 'children': [], 'value': "'unknown'"}; {'id': '390', 'type': 'comparison_operator', 'children': ['391', '394'], 'value': '=='}; {'id': '391', 'type': 'subscript', 'children': ['392', '393']}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '393', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '394', 'type': 'string', 'children': [], 'value': "'open'"}; {'id': '395', 'type': 'comparison_operator', 'children': ['396', '399'], 'value': '=='}; {'id': '396', 'type': 'subscript', 'children': ['397', '398']}; {'id': '397', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '398', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '399', 'type': 'string', 'children': [], 'value': "'unknown'"}; {'id': '400', 'type': 'block', 'children': ['401']}; {'id': '401', 'type': 'return_statement', 'children': ['402']}; {'id': '402', 'type': 'True', 'children': []}; {'id': '403', 'type': 'elif_clause', 'children': ['404', '411']}; {'id': '404', 'type': 'boolean_operator', 'children': ['405', '408'], 'value': 'and'}; {'id': '405', 'type': 'comparison_operator', 'children': ['406', '407'], 'value': '=='}; {'id': '406', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '407', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '408', 'type': 'comparison_operator', 'children': ['409', '410'], 'value': '=='}; {'id': '409', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '410', 'type': 'string', 'children': [], 'value': "'pos'"}; {'id': '411', 'type': 'block', 'children': ['412']}; {'id': '412', 'type': 'if_statement', 'children': ['413', '420']}; {'id': '413', 'type': 'boolean_operator', 'children': ['414', '419'], 'value': 'and'}; {'id': '414', 'type': 'boolean_operator', 'children': ['415', '418'], 'value': 'and'}; {'id': '415', 'type': 'comparison_operator', 'children': ['416', '417'], 'value': '<='}; {'id': '416', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '417', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '418', 'type': 'identifier', 'children': [], 'value': 'from_date'}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'to_date'}; {'id': '420', 'type': 'block', 'children': ['421']}; {'id': '421', 'type': 'return_statement', 'children': ['422']}; {'id': '422', 'type': 'True', 'children': []}; {'id': '423', 'type': 'else_clause', 'children': ['424']}; {'id': '424', 'type': 'block', 'children': ['425']}; {'id': '425', 'type': 'return_statement', 'children': ['426']}; {'id': '426', 'type': 'False', 'children': []}; {'id': '427', 'type': 'else_clause', 'children': ['428']}; {'id': '428', 'type': 'block', 'children': ['429']}; {'id': '429', 'type': 'return_statement', 'children': ['430']}; {'id': '430', 'type': 'False', 'children': []}
Test to see if the edtf candidate is a valid interval
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'update_node_ids'}; {'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': 'sub_job_num'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '27', '31', '35', '67', '82', '87', '104', '121', '133']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'dag_id'}; {'id': '12', 'type': 'conditional_expression', 'children': ['13', '20', '21'], 'value': 'if'}; {'id': '13', 'type': 'binary_operator', 'children': ['14', '15'], 'value': '%'}; {'id': '14', 'type': 'string', 'children': [], 'value': "'%s.%s'"}; {'id': '15', 'type': 'tuple', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'sub_job_num'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'sub_job_num'}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '23', 'type': 'argument_list', 'children': ['24']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'job_delimiter'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'+++'"}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '34', 'type': 'string', 'children': [], 'value': "';;;'"}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '38', 'type': 'list', 'children': ['39', '40', '45', '46', '47', '52', '53', '54', '59', '60', '61', '66'], 'value': '[\n \'-format\', \'"%d\' + attr_delimiter + \'"\', \'ClusterId\',\n \'-format\', \'"%v\' + attr_delimiter + \'"\', \'Cmd\',\n \'-format\', \'"%v\' + attr_delimiter + \'"\', \'Args\',\n \'-format\', \'"%v\' + job_delimiter + \'"\', \'Arguments\'\n ]'}; {'id': '39', 'type': 'string', 'children': [], 'value': "'-format'"}; {'id': '40', 'type': 'binary_operator', 'children': ['41', '44'], 'value': '+'}; {'id': '41', 'type': 'binary_operator', 'children': ['42', '43'], 'value': '+'}; {'id': '42', 'type': 'string', 'children': [], 'value': '\'"%d\''}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '44', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '45', 'type': 'string', 'children': [], 'value': "'ClusterId'"}; {'id': '46', 'type': 'string', 'children': [], 'value': "'-format'"}; {'id': '47', 'type': 'binary_operator', 'children': ['48', '51'], 'value': '+'}; {'id': '48', 'type': 'binary_operator', 'children': ['49', '50'], 'value': '+'}; {'id': '49', 'type': 'string', 'children': [], 'value': '\'"%v\''}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '51', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '52', 'type': 'string', 'children': [], 'value': "'Cmd'"}; {'id': '53', 'type': 'string', 'children': [], 'value': "'-format'"}; {'id': '54', 'type': 'binary_operator', 'children': ['55', '58'], 'value': '+'}; {'id': '55', 'type': 'binary_operator', 'children': ['56', '57'], 'value': '+'}; {'id': '56', 'type': 'string', 'children': [], 'value': '\'"%v\''}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '58', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '59', 'type': 'string', 'children': [], 'value': "'Args'"}; {'id': '60', 'type': 'string', 'children': [], 'value': "'-format'"}; {'id': '61', 'type': 'binary_operator', 'children': ['62', '65'], 'value': '+'}; {'id': '62', 'type': 'binary_operator', 'children': ['63', '64'], 'value': '+'}; {'id': '63', 'type': 'string', 'children': [], 'value': '\'"%v\''}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'job_delimiter'}; {'id': '65', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '66', 'type': 'string', 'children': [], 'value': "'Arguments'"}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'assignment', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '70', 'type': 'call', 'children': ['71', '74']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'string', 'children': [], 'value': "'condor_q -constraint DAGManJobID=={0} {1} && condor_history -constraint DAGManJobID=={0} {1}'"}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '74', 'type': 'argument_list', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'dag_id'}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'assignment', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '85', 'type': 'list', 'children': ['86'], 'value': '[cmd]'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '92']}; {'id': '89', 'type': 'pattern_list', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': '_execute'}; {'id': '96', 'type': 'argument_list', 'children': ['97', '98', '101']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '98', 'type': 'keyword_argument', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'shell'}; {'id': '100', 'type': 'True', 'children': []}; {'id': '101', 'type': 'keyword_argument', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'run_in_job_dir'}; {'id': '103', 'type': 'False', 'children': []}; {'id': '104', 'type': 'if_statement', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '106', 'type': 'block', 'children': ['107', '116']}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'call', 'children': ['109', '112']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '112', 'type': 'argument_list', 'children': ['113', '114', '115']}; {'id': '113', 'type': 'string', 'children': [], 'value': "'Error while associating ids for jobs dag %s: %s'"}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'dag_id'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '116', 'type': 'raise_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'HTCondorError'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '121', 'type': 'if_statement', 'children': ['122', '124']}; {'id': '122', 'type': 'not_operator', 'children': ['123']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '130', 'type': 'argument_list', 'children': ['131', '132']}; {'id': '131', 'type': 'string', 'children': [], 'value': "'Error while associating ids for jobs in dag %s: No jobs found for dag.'"}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'dag_id'}; {'id': '133', 'type': 'try_statement', 'children': ['134', '282']}; {'id': '134', 'type': 'block', 'children': ['135', '144']}; {'id': '135', 'type': 'expression_statement', 'children': ['136']}; {'id': '136', 'type': 'assignment', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'jobs_out'}; {'id': '138', 'type': 'call', 'children': ['139', '142']}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '142', 'type': 'argument_list', 'children': ['143']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'job_delimiter'}; {'id': '144', 'type': 'for_statement', 'children': ['145', '146', '149']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': '_node_set'}; {'id': '149', 'type': 'block', 'children': ['150', '156', '166']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '156', 'type': 'if_statement', 'children': ['157', '164']}; {'id': '157', 'type': 'comparison_operator', 'children': ['158', '161'], 'value': '!='}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'NULL_CLUSTER_ID'}; {'id': '164', 'type': 'block', 'children': ['165']}; {'id': '165', 'type': 'continue_statement', 'children': []}; {'id': '166', 'type': 'for_statement', 'children': ['167', '168', '169']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'job_out'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'jobs_out'}; {'id': '169', 'type': 'block', 'children': ['170', '179', '192', '232', '238', '253']}; {'id': '170', 'type': 'if_statement', 'children': ['171', '177']}; {'id': '171', 'type': 'boolean_operator', 'children': ['172', '174'], 'value': 'or'}; {'id': '172', 'type': 'not_operator', 'children': ['173']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'job_out'}; {'id': '174', 'type': 'comparison_operator', 'children': ['175', '176'], 'value': 'not'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'job_out'}; {'id': '177', 'type': 'block', 'children': ['178']}; {'id': '178', 'type': 'continue_statement', 'children': []}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '186']}; {'id': '181', 'type': 'pattern_list', 'children': ['182', '183', '184', '185']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': '_arguments'}; {'id': '186', 'type': 'call', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'job_out'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '190', 'type': 'argument_list', 'children': ['191']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'attr_delimiter'}; {'id': '192', 'type': 'if_statement', 'children': ['193', '200', '209', '222']}; {'id': '193', 'type': 'boolean_operator', 'children': ['194', '197'], 'value': 'and'}; {'id': '194', 'type': 'comparison_operator', 'children': ['195', '196'], 'value': '=='}; {'id': '195', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '196', 'type': 'string', 'children': [], 'value': "'undefined'"}; {'id': '197', 'type': 'comparison_operator', 'children': ['198', '199'], 'value': '!='}; {'id': '198', 'type': 'identifier', 'children': [], 'value': '_arguments'}; {'id': '199', 'type': 'string', 'children': [], 'value': "'undefined'"}; {'id': '200', 'type': 'block', 'children': ['201']}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'assignment', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '204', 'type': 'call', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': '_arguments'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '208', 'type': 'argument_list', 'children': []}; {'id': '209', 'type': 'elif_clause', 'children': ['210', '217']}; {'id': '210', 'type': 'boolean_operator', 'children': ['211', '214'], 'value': 'and'}; {'id': '211', 'type': 'comparison_operator', 'children': ['212', '213'], 'value': '=='}; {'id': '212', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '213', 'type': 'string', 'children': [], 'value': "'undefined'"}; {'id': '214', 'type': 'comparison_operator', 'children': ['215', '216'], 'value': '=='}; {'id': '215', 'type': 'identifier', 'children': [], 'value': '_arguments'}; {'id': '216', 'type': 'string', 'children': [], 'value': "'undefined'"}; {'id': '217', 'type': 'block', 'children': ['218']}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'assignment', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '221', 'type': 'None', 'children': []}; {'id': '222', 'type': 'else_clause', 'children': ['223']}; {'id': '223', 'type': 'block', 'children': ['224']}; {'id': '224', 'type': 'expression_statement', 'children': ['225']}; {'id': '225', 'type': 'assignment', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '227', 'type': 'call', 'children': ['228', '231']}; {'id': '228', 'type': 'attribute', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': '_args'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '231', 'type': 'argument_list', 'children': []}; {'id': '232', 'type': 'expression_statement', 'children': ['233']}; {'id': '233', 'type': 'assignment', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'job_cmd'}; {'id': '235', 'type': 'attribute', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'executable'}; {'id': '238', 'type': 'expression_statement', 'children': ['239']}; {'id': '239', 'type': 'assignment', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'job_args'}; {'id': '241', 'type': 'conditional_expression', 'children': ['242', '249', '252'], 'value': 'if'}; {'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': 'job'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'arguments'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '248', 'type': 'argument_list', 'children': []}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'arguments'}; {'id': '252', 'type': 'None', 'children': []}; {'id': '253', 'type': 'if_statement', 'children': ['254', '261']}; {'id': '254', 'type': 'boolean_operator', 'children': ['255', '258'], 'value': 'and'}; {'id': '255', 'type': 'comparison_operator', 'children': ['256', '257'], 'value': 'in'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'job_cmd'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'cmd'}; {'id': '258', 'type': 'comparison_operator', 'children': ['259', '260'], 'value': '=='}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'job_args'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '261', 'type': 'block', 'children': ['262', '272', '281']}; {'id': '262', 'type': 'expression_statement', 'children': ['263']}; {'id': '263', 'type': 'call', 'children': ['264', '267']}; {'id': '264', 'type': 'attribute', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '267', 'type': 'argument_list', 'children': ['268', '269', '270', '271']}; {'id': '268', 'type': 'string', 'children': [], 'value': "'Linking cluster_id %s to job with command and arguments: %s %s'"}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'job_cmd'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'job_args'}; {'id': '272', 'type': 'expression_statement', 'children': ['273']}; {'id': '273', 'type': 'assignment', 'children': ['274', '277']}; {'id': '274', 'type': 'attribute', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'job'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': '_cluster_id'}; {'id': '277', 'type': 'call', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '279', 'type': 'argument_list', 'children': ['280']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'cluster_id'}; {'id': '281', 'type': 'break_statement', 'children': []}; {'id': '282', 'type': 'except_clause', 'children': ['283', '287']}; {'id': '283', 'type': 'as_pattern', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '285', 'type': 'as_pattern_target', 'children': ['286']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '287', 'type': 'block', 'children': ['288']}; {'id': '288', 'type': 'expression_statement', 'children': ['289']}; {'id': '289', 'type': 'call', 'children': ['290', '293']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '293', 'type': 'argument_list', 'children': ['294']}; {'id': '294', 'type': 'call', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '296', 'type': 'argument_list', 'children': ['297']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'e'}
Associate Jobs with respective cluster ids.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_parse_status'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '40', '57', '74', '97', '109', '121', '133', '145', '168', '191', '214', '239', '264', '285', '302']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'Bugreport'}; {'id': '11', 'type': 'argument_list', 'children': []}; {'id': '12', 'type': 'for_statement', 'children': ['13', '14', '26']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '14', 'type': 'tuple', 'children': ['15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25']}; {'id': '15', 'type': 'string', 'children': [], 'value': "'originator'"}; {'id': '16', 'type': 'string', 'children': [], 'value': "'subject'"}; {'id': '17', 'type': 'string', 'children': [], 'value': "'msgid'"}; {'id': '18', 'type': 'string', 'children': [], 'value': "'package'"}; {'id': '19', 'type': 'string', 'children': [], 'value': "'severity'"}; {'id': '20', 'type': 'string', 'children': [], 'value': "'owner'"}; {'id': '21', 'type': 'string', 'children': [], 'value': "'summary'"}; {'id': '22', 'type': 'string', 'children': [], 'value': "'location'"}; {'id': '23', 'type': 'string', 'children': [], 'value': "'source'"}; {'id': '24', 'type': 'string', 'children': [], 'value': "'pending'"}; {'id': '25', 'type': 'string', 'children': [], 'value': "'forwarded'"}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'setattr'}; {'id': '30', 'type': 'argument_list', 'children': ['31', '32', '33']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': '_parse_string_el'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'date'}; {'id': '45', 'type': 'call', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'utcfromtimestamp'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'string', 'children': [], 'value': "'date'"}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '62']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'log_modified'}; {'id': '62', 'type': 'call', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'utcfromtimestamp'}; {'id': '66', 'type': 'argument_list', 'children': ['67']}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'call', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '72', 'type': 'argument_list', 'children': ['73']}; {'id': '73', 'type': 'string', 'children': [], 'value': "'log_modified'"}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '79', 'type': 'list_comprehension', 'children': ['80', '84']}; {'id': '80', 'type': 'call', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': '_uc'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '84', 'type': 'for_in_clause', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '86', 'type': 'call', 'children': ['87', '96']}; {'id': '87', 'type': 'attribute', 'children': ['88', '95']}; {'id': '88', 'type': 'call', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'string', 'children': [], 'value': "'tags'"}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '96', 'type': 'argument_list', 'children': []}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'assignment', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'done'}; {'id': '102', 'type': 'call', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': '_parse_bool'}; {'id': '104', 'type': 'argument_list', 'children': ['105']}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'string', 'children': [], 'value': "'done'"}; {'id': '109', 'type': 'expression_statement', 'children': ['110']}; {'id': '110', 'type': 'assignment', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'archived'}; {'id': '114', 'type': 'call', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': '_parse_bool'}; {'id': '116', 'type': 'argument_list', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'string', 'children': [], 'value': "'archived'"}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'unarchived'}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': '_parse_bool'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'call', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'string', 'children': [], 'value': "'unarchived'"}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '138']}; {'id': '135', 'type': 'attribute', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'bug_num'}; {'id': '138', 'type': 'call', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'call', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'string', 'children': [], 'value': "'bug_num'"}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'assignment', 'children': ['147', '150']}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'mergedwith'}; {'id': '150', 'type': 'list_comprehension', 'children': ['151', '155']}; {'id': '151', 'type': 'call', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '153', 'type': 'argument_list', 'children': ['154']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '155', 'type': 'for_in_clause', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '157', 'type': 'call', 'children': ['158', '167']}; {'id': '158', 'type': 'attribute', 'children': ['159', '166']}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'call', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'string', 'children': [], 'value': "'mergedwith'"}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '167', 'type': 'argument_list', 'children': []}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'assignment', 'children': ['170', '173']}; {'id': '170', 'type': 'attribute', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'blockedby'}; {'id': '173', 'type': 'list_comprehension', 'children': ['174', '178']}; {'id': '174', 'type': 'call', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '176', 'type': 'argument_list', 'children': ['177']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '178', 'type': 'for_in_clause', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '180', 'type': 'call', 'children': ['181', '190']}; {'id': '181', 'type': 'attribute', 'children': ['182', '189']}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'call', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '187', 'type': 'argument_list', 'children': ['188']}; {'id': '188', 'type': 'string', 'children': [], 'value': "'blockedby'"}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '190', 'type': 'argument_list', 'children': []}; {'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': 'bug'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'blocks'}; {'id': '196', 'type': 'list_comprehension', 'children': ['197', '201']}; {'id': '197', 'type': 'call', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '199', 'type': 'argument_list', 'children': ['200']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '201', 'type': 'for_in_clause', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '203', 'type': 'call', 'children': ['204', '213']}; {'id': '204', 'type': 'attribute', 'children': ['205', '212']}; {'id': '205', 'type': 'call', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'call', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '210', 'type': 'argument_list', 'children': ['211']}; {'id': '211', 'type': 'string', 'children': [], 'value': "'blocks'"}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '213', 'type': 'argument_list', 'children': []}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'assignment', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'found_versions'}; {'id': '219', 'type': 'list_comprehension', 'children': ['220', '227']}; {'id': '220', 'type': 'call', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': '_uc'}; {'id': '222', 'type': 'argument_list', 'children': ['223']}; {'id': '223', 'type': 'call', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '225', 'type': 'argument_list', 'children': ['226']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'el'}; {'id': '227', 'type': 'for_in_clause', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'el'}; {'id': '229', 'type': 'boolean_operator', 'children': ['230', '238'], 'value': 'or'}; {'id': '230', 'type': 'call', 'children': ['231', '237']}; {'id': '231', 'type': 'attribute', 'children': ['232', '236']}; {'id': '232', 'type': 'call', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '234', 'type': 'argument_list', 'children': ['235']}; {'id': '235', 'type': 'string', 'children': [], 'value': "'found_versions'"}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'children'}; {'id': '237', 'type': 'argument_list', 'children': []}; {'id': '238', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '239', 'type': 'expression_statement', 'children': ['240']}; {'id': '240', 'type': 'assignment', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'fixed_versions'}; {'id': '244', 'type': 'list_comprehension', 'children': ['245', '252']}; {'id': '245', 'type': 'call', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': '_uc'}; {'id': '247', 'type': 'argument_list', 'children': ['248']}; {'id': '248', 'type': 'call', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '250', 'type': 'argument_list', 'children': ['251']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'el'}; {'id': '252', 'type': 'for_in_clause', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'el'}; {'id': '254', 'type': 'boolean_operator', 'children': ['255', '263'], 'value': 'or'}; {'id': '255', 'type': 'call', 'children': ['256', '262']}; {'id': '256', 'type': 'attribute', 'children': ['257', '261']}; {'id': '257', 'type': 'call', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '259', 'type': 'argument_list', 'children': ['260']}; {'id': '260', 'type': 'string', 'children': [], 'value': "'fixed_versions'"}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'children'}; {'id': '262', 'type': 'argument_list', 'children': []}; {'id': '263', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '264', 'type': 'expression_statement', 'children': ['265']}; {'id': '265', 'type': 'assignment', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'affects'}; {'id': '267', 'type': 'list_comprehension', 'children': ['268', '269', '283']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': '_f'}; {'id': '269', 'type': 'for_in_clause', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': '_f'}; {'id': '271', 'type': 'call', 'children': ['272', '281']}; {'id': '272', 'type': 'attribute', 'children': ['273', '280']}; {'id': '273', 'type': 'call', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'call', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'bug_el'}; {'id': '278', 'type': 'argument_list', 'children': ['279']}; {'id': '279', 'type': 'string', 'children': [], 'value': "'affects'"}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '281', 'type': 'argument_list', 'children': ['282']}; {'id': '282', 'type': 'string', 'children': [], 'value': "','"}; {'id': '283', 'type': 'if_clause', 'children': ['284']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': '_f'}; {'id': '285', 'type': 'expression_statement', 'children': ['286']}; {'id': '286', 'type': 'assignment', 'children': ['287', '290']}; {'id': '287', 'type': 'attribute', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'bug'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'affects'}; {'id': '290', 'type': 'list_comprehension', 'children': ['291', '299']}; {'id': '291', 'type': 'call', 'children': ['292', '298']}; {'id': '292', 'type': 'attribute', 'children': ['293', '297']}; {'id': '293', 'type': 'call', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': '_uc'}; {'id': '295', 'type': 'argument_list', 'children': ['296']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'strip'}; {'id': '298', 'type': 'argument_list', 'children': []}; {'id': '299', 'type': 'for_in_clause', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'affects'}; {'id': '302', 'type': 'return_statement', 'children': ['303']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'bug'}
Return a bugreport object from a given status xml element
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'movefastq'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Moving FASTQ files'"}; {'id': '13', 'type': 'for_statement', 'children': ['14', '15', '22']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '15', 'type': 'attribute', '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': 'metadata'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'runmetadata'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'samples'}; {'id': '22', 'type': 'block', 'children': ['23', '39', '168', '334']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'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': 'os'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'join'}; {'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': 'path'}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '42', 'type': 'conditional_expression', 'children': ['43', '67', '68', '92', '93'], 'value': 'if'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'call', 'children': ['50', '55']}; {'id': '50', 'type': 'attribute', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '59', 'type': 'call', 'children': ['60', '63']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'string', 'children': [], 'value': "'{}_*.fastq*'"}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '67', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '68', 'type': 'call', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'call', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '73', 'type': 'argument_list', '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': 'os'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '80', 'type': 'argument_list', 'children': ['81', '84']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '84', 'type': 'call', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'string', 'children': [], 'value': "'{}_*.fastq*'"}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '88', 'type': 'argument_list', 'children': ['89']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '92', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '93', 'type': 'conditional_expression', 'children': ['94', '118', '119', '143', '144'], 'value': 'if'}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '99', 'type': 'argument_list', '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': 'os'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '106', 'type': 'argument_list', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '110', 'type': 'call', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'string', 'children': [], 'value': "'{}.fastq*'"}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '114', 'type': 'argument_list', 'children': ['115']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '118', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'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', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '124', 'type': 'argument_list', 'children': ['125']}; {'id': '125', 'type': 'call', 'children': ['126', '131']}; {'id': '126', 'type': 'attribute', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '131', 'type': 'argument_list', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '135', 'type': 'call', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'string', 'children': [], 'value': "'{}.fastq*'"}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '143', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '144', 'type': 'call', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '146', 'type': 'argument_list', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '149', 'type': 'argument_list', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '156']}; {'id': '151', 'type': 'attribute', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '156', 'type': 'argument_list', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'string', 'children': [], 'value': "'{}*.fastq*'"}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'attribute', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '168', 'type': 'if_statement', 'children': ['169', '170', '279']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '170', 'type': 'block', 'children': ['171', '176', '230']}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'call', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'make_path'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '176', 'type': 'try_statement', 'children': ['177', '226']}; {'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': 'list'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'map'}; {'id': '184', 'type': 'argument_list', 'children': ['185', '225']}; {'id': '185', 'type': 'lambda', 'children': ['186', '188']}; {'id': '186', 'type': 'lambda_parameters', 'children': ['187']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '188', 'type': 'call', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'symlink'}; {'id': '192', 'type': 'argument_list', 'children': ['193', '209']}; {'id': '193', 'type': 'call', 'children': ['194', '199']}; {'id': '194', 'type': 'attribute', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '199', 'type': 'argument_list', 'children': ['200', '201']}; {'id': '200', 'type': 'string', 'children': [], 'value': "'..'"}; {'id': '201', 'type': 'call', 'children': ['202', '207']}; {'id': '202', 'type': 'attribute', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'basename'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '209', 'type': 'call', 'children': ['210', '215']}; {'id': '210', 'type': 'attribute', 'children': ['211', '214']}; {'id': '211', 'type': 'attribute', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '215', 'type': 'argument_list', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '217', 'type': 'call', 'children': ['218', '223']}; {'id': '218', 'type': 'attribute', 'children': ['219', '222']}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'basename'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '226', 'type': 'except_clause', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'OSError'}; {'id': '228', 'type': 'block', 'children': ['229']}; {'id': '229', 'type': 'pass_statement', 'children': []}; {'id': '230', 'type': 'expression_statement', 'children': ['231']}; {'id': '231', 'type': 'assignment', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '233', 'type': 'list_comprehension', 'children': ['234', '235', '259']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '235', 'type': 'for_in_clause', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '237', 'type': 'call', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '239', 'type': 'argument_list', 'children': ['240']}; {'id': '240', 'type': 'call', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '242', 'type': 'argument_list', 'children': ['243']}; {'id': '243', 'type': 'call', 'children': ['244', '249']}; {'id': '244', 'type': 'attribute', 'children': ['245', '248']}; {'id': '245', 'type': 'attribute', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '249', 'type': 'argument_list', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '251', 'type': 'call', 'children': ['252', '255']}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'string', 'children': [], 'value': "'{}*.fastq*'"}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '255', 'type': 'argument_list', 'children': ['256']}; {'id': '256', 'type': 'attribute', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '259', 'type': 'if_clause', 'children': ['260']}; {'id': '260', 'type': 'boolean_operator', 'children': ['261', '276'], 'value': 'and'}; {'id': '261', 'type': 'boolean_operator', 'children': ['262', '273'], 'value': 'and'}; {'id': '262', 'type': 'boolean_operator', 'children': ['263', '270'], 'value': 'and'}; {'id': '263', 'type': 'boolean_operator', 'children': ['264', '267'], 'value': 'and'}; {'id': '264', 'type': 'comparison_operator', 'children': ['265', '266'], 'value': 'not'}; {'id': '265', 'type': 'string', 'children': [], 'value': "'trimmed'"}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '267', 'type': 'comparison_operator', 'children': ['268', '269'], 'value': 'not'}; {'id': '268', 'type': 'string', 'children': [], 'value': "'normalised'"}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '270', 'type': 'comparison_operator', 'children': ['271', '272'], 'value': 'not'}; {'id': '271', 'type': 'string', 'children': [], 'value': "'corrected'"}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '273', 'type': 'comparison_operator', 'children': ['274', '275'], 'value': 'not'}; {'id': '274', 'type': 'string', 'children': [], 'value': "'paired'"}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '276', 'type': 'comparison_operator', 'children': ['277', '278'], 'value': 'not'}; {'id': '277', 'type': 'string', 'children': [], 'value': "'unpaired'"}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '279', 'type': 'else_clause', 'children': ['280']}; {'id': '280', 'type': 'block', 'children': ['281']}; {'id': '281', 'type': 'if_statement', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '283', 'type': 'block', 'children': ['284']}; {'id': '284', 'type': 'expression_statement', 'children': ['285']}; {'id': '285', 'type': 'assignment', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '287', 'type': 'list_comprehension', 'children': ['288', '289', '314']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '289', 'type': 'for_in_clause', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '291', 'type': 'call', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '293', 'type': 'argument_list', 'children': ['294']}; {'id': '294', 'type': 'call', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '296', 'type': 'argument_list', 'children': ['297']}; {'id': '297', 'type': 'call', 'children': ['298', '303']}; {'id': '298', 'type': 'attribute', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '303', 'type': 'argument_list', 'children': ['304', '305']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '305', 'type': 'call', 'children': ['306', '309']}; {'id': '306', 'type': 'attribute', 'children': ['307', '308']}; {'id': '307', 'type': 'string', 'children': [], 'value': "'{}*.fastq*'"}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '309', 'type': 'argument_list', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '311', 'type': 'attribute', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '314', 'type': 'if_clause', 'children': ['315']}; {'id': '315', 'type': 'boolean_operator', 'children': ['316', '331'], 'value': 'and'}; {'id': '316', 'type': 'boolean_operator', 'children': ['317', '328'], 'value': 'and'}; {'id': '317', 'type': 'boolean_operator', 'children': ['318', '325'], 'value': 'and'}; {'id': '318', 'type': 'boolean_operator', 'children': ['319', '322'], 'value': 'and'}; {'id': '319', 'type': 'comparison_operator', 'children': ['320', '321'], 'value': 'not'}; {'id': '320', 'type': 'string', 'children': [], 'value': "'trimmed'"}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '322', 'type': 'comparison_operator', 'children': ['323', '324'], 'value': 'not'}; {'id': '323', 'type': 'string', 'children': [], 'value': "'normalised'"}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '325', 'type': 'comparison_operator', 'children': ['326', '327'], 'value': 'not'}; {'id': '326', 'type': 'string', 'children': [], 'value': "'corrected'"}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '328', 'type': 'comparison_operator', 'children': ['329', '330'], 'value': 'not'}; {'id': '329', 'type': 'string', 'children': [], 'value': "'paired'"}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '331', 'type': 'comparison_operator', 'children': ['332', '333'], 'value': 'not'}; {'id': '332', 'type': 'string', 'children': [], 'value': "'unpaired'"}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'fastq'}; {'id': '334', 'type': 'expression_statement', 'children': ['335']}; {'id': '335', 'type': 'assignment', 'children': ['336', '341']}; {'id': '336', 'type': 'attribute', 'children': ['337', '340']}; {'id': '337', 'type': 'attribute', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}
Find .fastq files for each sample and move them to an appropriately named folder
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '17', '19']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'delete_annotation'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '9', '13']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'typed_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'term_ilx_id'}; {'id': '7', 'type': 'type', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '9', 'type': 'typed_parameter', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'annotation_type_ilx_id'}; {'id': '11', 'type': 'type', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '13', 'type': 'typed_parameter', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'annotation_value'}; {'id': '15', 'type': 'type', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '17', 'type': 'type', 'children': ['18']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '19', 'type': 'block', 'children': ['20', '29', '44', '53', '68', '79', '83', '137', '148', '163', '182', '196']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'term_data'}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'get_entity'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'term_ilx_id'}; {'id': '29', 'type': 'if_statement', 'children': ['30', '34']}; {'id': '30', 'type': 'not_operator', 'children': ['31']}; {'id': '31', 'type': 'subscript', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'term_data'}; {'id': '33', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'binary_operator', 'children': ['40', '43'], 'value': '+'}; {'id': '40', 'type': 'binary_operator', 'children': ['41', '42'], 'value': '+'}; {'id': '41', 'type': 'string', 'children': [], 'value': "'term_ilx_id: '"}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'term_ilx_id'}; {'id': '43', 'type': 'string', 'children': [], 'value': "' does not exist'"}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'anno_data'}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'get_entity'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'annotation_type_ilx_id'}; {'id': '53', 'type': 'if_statement', 'children': ['54', '58']}; {'id': '54', 'type': 'not_operator', 'children': ['55']}; {'id': '55', 'type': 'subscript', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'anno_data'}; {'id': '57', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'exit'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'binary_operator', 'children': ['64', '67'], 'value': '+'}; {'id': '64', 'type': 'binary_operator', 'children': ['65', '66'], 'value': '+'}; {'id': '65', 'type': 'string', 'children': [], 'value': "'annotation_type_ilx_id: '"}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'annotation_type_ilx_id'}; {'id': '67', 'type': 'string', 'children': [], 'value': "' does not exist'"}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'entity_annotations'}; {'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': 'get_annotation_via_tid'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'subscript', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'term_data'}; {'id': '78', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'annotation_id'}; {'id': '82', 'type': 'string', 'children': [], 'value': "''"}; {'id': '83', 'type': 'for_statement', 'children': ['84', '85', '86']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'entity_annotations'}; {'id': '86', 'type': 'block', 'children': ['87']}; {'id': '87', 'type': 'if_statement', 'children': ['88', '101']}; {'id': '88', 'type': 'comparison_operator', 'children': ['89', '95'], 'value': '=='}; {'id': '89', 'type': 'call', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'subscript', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '94', 'type': 'string', 'children': [], 'value': "'tid'"}; {'id': '95', 'type': 'call', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '97', 'type': 'argument_list', 'children': ['98']}; {'id': '98', 'type': 'subscript', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'term_data'}; {'id': '100', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '101', 'type': 'block', 'children': ['102']}; {'id': '102', 'type': 'if_statement', 'children': ['103', '116']}; {'id': '103', 'type': 'comparison_operator', 'children': ['104', '110'], 'value': '=='}; {'id': '104', 'type': 'call', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'subscript', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '109', 'type': 'string', 'children': [], 'value': "'annotation_tid'"}; {'id': '110', 'type': 'call', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '112', 'type': 'argument_list', 'children': ['113']}; {'id': '113', 'type': 'subscript', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'anno_data'}; {'id': '115', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '116', 'type': 'block', 'children': ['117']}; {'id': '117', 'type': 'if_statement', 'children': ['118', '129']}; {'id': '118', 'type': 'comparison_operator', 'children': ['119', '125'], 'value': '=='}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'subscript', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '124', 'type': 'string', 'children': [], 'value': "'value'"}; {'id': '125', 'type': 'call', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'annotation_value'}; {'id': '129', 'type': 'block', 'children': ['130', '136']}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'annotation_id'}; {'id': '133', 'type': 'subscript', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '135', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '136', 'type': 'break_statement', 'children': []}; {'id': '137', 'type': 'if_statement', 'children': ['138', '140']}; {'id': '138', 'type': 'not_operator', 'children': ['139']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'annotation_id'}; {'id': '140', 'type': 'block', 'children': ['141', '146']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'call', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '144', 'type': 'argument_list', 'children': ['145']}; {'id': '145', 'type': 'string', 'children': [], 'value': "'''WARNING: Annotation you wanted to delete does not exist '''"}; {'id': '146', 'type': 'return_statement', 'children': ['147']}; {'id': '147', 'type': 'None', 'children': []}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '151', 'type': 'binary_operator', 'children': ['152', '155'], 'value': '+'}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'base_url'}; {'id': '155', 'type': 'call', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'string', 'children': [], 'value': "'term/edit-annotation/{annotation_id}'"}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '159', 'type': 'argument_list', 'children': ['160']}; {'id': '160', 'type': 'keyword_argument', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'annotation_id'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'annotation_id'}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'assignment', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '166', 'type': 'dictionary', 'children': ['167', '170', '173', '176', '179']}; {'id': '167', 'type': 'pair', 'children': ['168', '169']}; {'id': '168', 'type': 'string', 'children': [], 'value': "'tid'"}; {'id': '169', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '170', 'type': 'pair', 'children': ['171', '172']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'annotation_tid'"}; {'id': '172', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '173', 'type': 'pair', 'children': ['174', '175']}; {'id': '174', 'type': 'string', 'children': [], 'value': "'value'"}; {'id': '175', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '176', 'type': 'pair', 'children': ['177', '178']}; {'id': '177', 'type': 'string', 'children': [], 'value': "'term_version'"}; {'id': '178', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '179', 'type': 'pair', 'children': ['180', '181']}; {'id': '180', 'type': 'string', 'children': [], 'value': "'annotation_term_version'"}; {'id': '181', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'assignment', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'output'}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'post'}; {'id': '189', 'type': 'argument_list', 'children': ['190', '193']}; {'id': '190', 'type': 'keyword_argument', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'url'}; {'id': '193', 'type': 'keyword_argument', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '196', 'type': 'return_statement', 'children': ['197']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'output'}
If annotation doesnt exist, add it
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'epcrparsethreads'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '11', '53']}; {'id': '6', 'type': 'import_from_statement', 'children': ['7', '9']}; {'id': '7', 'type': 'dotted_name', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'Bio'}; {'id': '9', 'type': 'dotted_name', 'children': ['10']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'SeqIO'}; {'id': '11', 'type': 'for_statement', 'children': ['12', '13', '16']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'if_statement', 'children': ['18', '25']}; {'id': '18', 'type': 'comparison_operator', 'children': ['19', '24'], 'value': '!='}; {'id': '19', 'type': 'attribute', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '24', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '25', 'type': 'block', 'children': ['26', '40', '47']}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'Thread'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '37']}; {'id': '32', 'type': 'keyword_argument', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'epcrparse'}; {'id': '37', 'type': 'keyword_argument', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '39', 'type': 'tuple', 'children': []}; {'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': 'threads'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'setDaemon'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'True', 'children': []}; {'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': 'threads'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '52', 'type': 'argument_list', 'children': []}; {'id': '53', 'type': 'for_statement', 'children': ['54', '55', '58']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'if_statement', 'children': ['60', '67']}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '66'], 'value': '!='}; {'id': '61', 'type': 'attribute', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '66', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '67', 'type': 'block', 'children': ['68']}; {'id': '68', 'type': 'if_statement', 'children': ['69', '78']}; {'id': '69', 'type': 'comparison_operator', 'children': ['70', '77'], 'value': '!='}; {'id': '70', 'type': 'attribute', 'children': ['71', '76']}; {'id': '71', 'type': 'subscript', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'primers'}; {'id': '77', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '78', 'type': 'block', 'children': ['79', '85', '97', '109', '136']}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'record'}; {'id': '82', 'type': 'call', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '84', 'type': 'argument_list', 'children': []}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '94']}; {'id': '87', 'type': 'attribute', 'children': ['88', '93']}; {'id': '88', 'type': 'subscript', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'blastresults'}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '96', 'type': 'argument_list', 'children': []}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'assignment', 'children': ['99', '106']}; {'id': '99', 'type': 'attribute', 'children': ['100', '105']}; {'id': '100', 'type': 'subscript', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'rawblastresults'}; {'id': '106', 'type': 'call', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '108', 'type': 'argument_list', 'children': []}; {'id': '109', 'type': 'for_statement', 'children': ['110', '111', '122']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'rec'}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'SeqIO'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'parse'}; {'id': '115', 'type': 'argument_list', 'children': ['116', '121']}; {'id': '116', 'type': 'attribute', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '121', 'type': 'string', 'children': [], 'value': "'fasta'"}; {'id': '122', 'type': 'block', 'children': ['123']}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '130']}; {'id': '125', 'type': 'subscript', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'record'}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'rec'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '130', 'type': 'call', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '132', 'type': 'argument_list', 'children': ['133']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'rec'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'seq'}; {'id': '136', 'type': 'for_statement', 'children': ['137', '138', '145', '168']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '138', 'type': 'attribute', 'children': ['139', '144']}; {'id': '139', 'type': 'subscript', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'epcrresults'}; {'id': '145', 'type': 'ERROR', 'children': ['146', '149', '161']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '149', 'type': 'ERROR', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '156']}; {'id': '151', 'type': 'attribute', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'epcrparsequeue'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'put'}; {'id': '156', 'type': 'argument_list', 'children': ['157']}; {'id': '157', 'type': 'tuple', 'children': ['158', '159', '160']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'record'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '161', 'type': 'call', 'children': ['162', '167']}; {'id': '162', 'type': 'attribute', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'epcrparsequeue'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '167', 'type': 'argument_list', 'children': []}; {'id': '168', 'type': 'block', 'children': [], 'value': ''}
Parse the ePCR results, and run BLAST on the parsed results
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'trimquality'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13', '392']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': '"Trimming fastq files"'}; {'id': '13', 'type': 'with_statement', 'children': ['14', '25']}; {'id': '14', 'type': 'with_clause', 'children': ['15']}; {'id': '15', 'type': 'with_item', 'children': ['16']}; {'id': '16', 'type': 'as_pattern', 'children': ['17', '23']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'progressbar'}; {'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': 'metadata'}; {'id': '23', 'type': 'as_pattern_target', 'children': ['24']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'bar'}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'for_statement', 'children': ['27', '28', '29']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'bar'}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'if_statement', 'children': ['31', '41']}; {'id': '31', 'type': 'comparison_operator', 'children': ['32', '40'], 'value': 'is'}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '41', 'type': 'block', 'children': ['42', '53', '61', '80', '99', '137', '146', '150', '315', '336', '357', '379']}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'assignment', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '45', 'type': 'call', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'attribute', 'children': ['49', '52']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '56', 'type': 'attribute', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'outputdirectory'}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'cleanforward'}; {'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': 'os'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '70', 'type': 'argument_list', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'string', 'children': [], 'value': "'{}_R1_trimmed.fastq.gz'"}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'cleanreverse'}; {'id': '83', 'type': 'call', 'children': ['84', '89']}; {'id': '84', 'type': 'attribute', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '89', 'type': 'argument_list', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'outputdir'}; {'id': '91', 'type': 'call', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'string', 'children': [], 'value': "'{}_R2_trimmed.fastq.gz'"}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '99', 'type': 'try_statement', 'children': ['100', '123']}; {'id': '100', 'type': 'block', 'children': ['101']}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'assignment', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'lesser_length'}; {'id': '104', 'type': 'call', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '106', 'type': 'argument_list', 'children': ['107', '115']}; {'id': '107', 'type': 'call', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'attribute', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'forwardlength'}; {'id': '115', 'type': 'call', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '117', 'type': 'argument_list', 'children': ['118']}; {'id': '118', 'type': 'attribute', 'children': ['119', '122']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'reverselength'}; {'id': '123', 'type': 'except_clause', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '125', 'type': 'block', 'children': ['126']}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'assignment', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'lesser_length'}; {'id': '129', 'type': 'call', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'attribute', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'forwardlength'}; {'id': '137', 'type': 'expression_statement', 'children': ['138']}; {'id': '138', 'type': 'assignment', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'min_len'}; {'id': '140', 'type': 'conditional_expression', 'children': ['141', '142', '145'], 'value': 'if'}; {'id': '141', 'type': 'integer', 'children': [], 'value': '50'}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '144'], 'value': '>='}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'lesser_length'}; {'id': '144', 'type': 'integer', 'children': [], 'value': '50'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'lesser_length'}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'trim_left'}; {'id': '149', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '150', 'type': 'try_statement', 'children': ['151', '292']}; {'id': '151', 'type': 'block', 'children': ['152']}; {'id': '152', 'type': 'if_statement', 'children': ['153', '158', '226']}; {'id': '153', 'type': 'comparison_operator', 'children': ['154', '155'], 'value': 'in'}; {'id': '154', 'type': 'string', 'children': [], 'value': "'R2'"}; {'id': '155', 'type': 'subscript', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '157', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '158', 'type': 'block', 'children': ['159']}; {'id': '159', 'type': 'if_statement', 'children': ['160', '169', '206']}; {'id': '160', 'type': 'not_operator', 'children': ['161']}; {'id': '161', 'type': 'call', 'children': ['162', '167']}; {'id': '162', 'type': 'attribute', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '167', 'type': 'argument_list', 'children': ['168']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'cleanreverse'}; {'id': '169', 'type': 'block', 'children': ['170']}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'assignment', 'children': ['172', '178']}; {'id': '172', 'type': 'pattern_list', 'children': ['173', '174', '175', '176', '177']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '174', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '176', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '178', 'type': 'call', 'children': ['179', '182']}; {'id': '179', 'type': 'attribute', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'bbtools'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'bbduk_trim'}; {'id': '182', 'type': 'argument_list', 'children': ['183', '188', '191', '194', '197', '200', '203']}; {'id': '183', 'type': 'keyword_argument', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'forward_in'}; {'id': '185', 'type': 'subscript', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '187', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '188', 'type': 'keyword_argument', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'reverse_in'}; {'id': '190', 'type': 'None', 'children': []}; {'id': '191', 'type': 'keyword_argument', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'forward_out'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'cleanreverse'}; {'id': '194', 'type': 'keyword_argument', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'trimq'}; {'id': '196', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '197', 'type': 'keyword_argument', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'minlength'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'min_len'}; {'id': '200', 'type': 'keyword_argument', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'forcetrimleft'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'trim_left'}; {'id': '203', 'type': 'keyword_argument', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'returncmd'}; {'id': '205', 'type': 'True', 'children': []}; {'id': '206', 'type': 'else_clause', 'children': ['207']}; {'id': '207', 'type': 'block', 'children': ['208', '214', '220']}; {'id': '208', 'type': 'expression_statement', 'children': ['209']}; {'id': '209', 'type': 'assignment', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '213', 'type': 'argument_list', 'children': []}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'assignment', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '217', 'type': 'call', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '219', 'type': 'argument_list', 'children': []}; {'id': '220', 'type': 'expression_statement', 'children': ['221']}; {'id': '221', 'type': 'assignment', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '223', 'type': 'call', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '225', 'type': 'argument_list', 'children': []}; {'id': '226', 'type': 'else_clause', 'children': ['227']}; {'id': '227', 'type': 'block', 'children': ['228']}; {'id': '228', 'type': 'if_statement', 'children': ['229', '238', '272']}; {'id': '229', 'type': 'not_operator', 'children': ['230']}; {'id': '230', 'type': 'call', 'children': ['231', '236']}; {'id': '231', 'type': 'attribute', 'children': ['232', '235']}; {'id': '232', 'type': 'attribute', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '236', 'type': 'argument_list', 'children': ['237']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'cleanforward'}; {'id': '238', 'type': 'block', 'children': ['239']}; {'id': '239', 'type': 'expression_statement', 'children': ['240']}; {'id': '240', 'type': 'assignment', 'children': ['241', '247']}; {'id': '241', 'type': 'pattern_list', 'children': ['242', '243', '244', '245', '246']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '243', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '245', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '247', 'type': 'call', 'children': ['248', '251']}; {'id': '248', 'type': 'attribute', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'bbtools'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'bbduk_trim'}; {'id': '251', 'type': 'argument_list', 'children': ['252', '257', '260', '263', '266', '269']}; {'id': '252', 'type': 'keyword_argument', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'forward_in'}; {'id': '254', 'type': 'subscript', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'fastqfiles'}; {'id': '256', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '257', 'type': 'keyword_argument', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'forward_out'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'cleanforward'}; {'id': '260', 'type': 'keyword_argument', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'trimq'}; {'id': '262', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '263', 'type': 'keyword_argument', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'minlength'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'min_len'}; {'id': '266', 'type': 'keyword_argument', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'forcetrimleft'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'trim_left'}; {'id': '269', 'type': 'keyword_argument', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'returncmd'}; {'id': '271', 'type': 'True', 'children': []}; {'id': '272', 'type': 'else_clause', 'children': ['273']}; {'id': '273', 'type': 'block', 'children': ['274', '280', '286']}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'assignment', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '277', 'type': 'call', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '279', 'type': 'argument_list', 'children': []}; {'id': '280', 'type': 'expression_statement', 'children': ['281']}; {'id': '281', 'type': 'assignment', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '283', 'type': 'call', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '285', 'type': 'argument_list', 'children': []}; {'id': '286', 'type': 'expression_statement', 'children': ['287']}; {'id': '287', 'type': 'assignment', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '289', 'type': 'call', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '291', 'type': 'argument_list', 'children': []}; {'id': '292', 'type': 'except_clause', 'children': ['293', '296']}; {'id': '293', 'type': 'tuple', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'CalledProcessError'}; {'id': '296', 'type': 'block', 'children': ['297', '303', '309']}; {'id': '297', 'type': 'expression_statement', 'children': ['298']}; {'id': '298', 'type': 'assignment', 'children': ['299', '300']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '300', 'type': 'call', 'children': ['301', '302']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '302', 'type': 'argument_list', 'children': []}; {'id': '303', 'type': 'expression_statement', 'children': ['304']}; {'id': '304', 'type': 'assignment', 'children': ['305', '306']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '306', 'type': 'call', 'children': ['307', '308']}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '308', 'type': 'argument_list', 'children': []}; {'id': '309', 'type': 'expression_statement', 'children': ['310']}; {'id': '310', 'type': 'assignment', 'children': ['311', '312']}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '312', 'type': 'call', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '314', 'type': 'argument_list', 'children': []}; {'id': '315', 'type': 'expression_statement', 'children': ['316']}; {'id': '316', 'type': 'call', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'write_to_logfile'}; {'id': '318', 'type': 'argument_list', 'children': ['319', '320', '321', '324', '329', '334', '335']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'bbdukcall'}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'logfile'}; {'id': '324', 'type': 'attribute', 'children': ['325', '328']}; {'id': '325', 'type': 'attribute', 'children': ['326', '327']}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'logout'}; {'id': '329', 'type': 'attribute', 'children': ['330', '333']}; {'id': '330', 'type': 'attribute', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'logerr'}; {'id': '334', 'type': 'None', 'children': []}; {'id': '335', 'type': 'None', 'children': []}; {'id': '336', 'type': 'expression_statement', 'children': ['337']}; {'id': '337', 'type': 'call', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'write_to_logfile'}; {'id': '339', 'type': 'argument_list', 'children': ['340', '341', '342', '345', '350', '355', '356']}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '342', 'type': 'attribute', 'children': ['343', '344']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'logfile'}; {'id': '345', 'type': 'attribute', 'children': ['346', '349']}; {'id': '346', 'type': 'attribute', 'children': ['347', '348']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'logout'}; {'id': '350', 'type': 'attribute', 'children': ['351', '354']}; {'id': '351', 'type': 'attribute', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'logerr'}; {'id': '355', 'type': 'None', 'children': []}; {'id': '356', 'type': 'None', 'children': []}; {'id': '357', 'type': 'expression_statement', 'children': ['358']}; {'id': '358', 'type': 'assignment', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'trimmedfastqfiles'}; {'id': '360', 'type': 'call', 'children': ['361', '362']}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '362', 'type': 'argument_list', 'children': ['363']}; {'id': '363', 'type': 'call', 'children': ['364', '365']}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '365', 'type': 'argument_list', 'children': ['366']}; {'id': '366', 'type': 'call', 'children': ['367', '372']}; {'id': '367', 'type': 'attribute', 'children': ['368', '371']}; {'id': '368', 'type': 'attribute', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '372', 'type': 'argument_list', 'children': ['373', '378']}; {'id': '373', 'type': 'attribute', 'children': ['374', '377']}; {'id': '374', 'type': 'attribute', 'children': ['375', '376']}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '377', 'type': 'identifier', 'children': [], 'value': 'outputdirectory'}; {'id': '378', 'type': 'string', 'children': [], 'value': "'*trimmed.fastq.gz'"}; {'id': '379', 'type': 'expression_statement', 'children': ['380']}; {'id': '380', 'type': 'assignment', 'children': ['381', '386']}; {'id': '381', 'type': 'attribute', 'children': ['382', '385']}; {'id': '382', 'type': 'attribute', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '385', 'type': 'identifier', 'children': [], 'value': 'trimmedfastqfiles'}; {'id': '386', 'type': 'conditional_expression', 'children': ['387', '388', '389'], 'value': 'if'}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'trimmedfastqfiles'}; {'id': '388', 'type': 'identifier', 'children': [], 'value': 'trimmedfastqfiles'}; {'id': '389', 'type': 'call', 'children': ['390', '391']}; {'id': '390', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '391', 'type': 'argument_list', 'children': []}; {'id': '392', 'type': 'expression_statement', 'children': ['393']}; {'id': '393', 'type': 'call', 'children': ['394', '397']}; {'id': '394', 'type': 'attribute', 'children': ['395', '396']}; {'id': '395', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '396', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '397', 'type': 'argument_list', 'children': ['398']}; {'id': '398', 'type': 'string', 'children': [], 'value': "'Fastq files trimmed'"}
Uses bbduk from the bbmap tool suite to quality and adapter trim
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'contamination_finder'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'input_path'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'report_path'}; {'id': '10', 'type': 'None', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12', '19', '36', '59', '72', '84', '192', '210', '395']}; {'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': 'logging'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'Calculating contamination in reads'"}; {'id': '19', 'type': 'if_statement', 'children': ['20', '23', '28']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '22'], 'value': 'is'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'input_path'}; {'id': '22', 'type': 'None', 'children': []}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'input_path'}; {'id': '28', 'type': 'else_clause', 'children': ['29']}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '40', '45']}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '39'], 'value': 'is'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'report_path'}; {'id': '39', 'type': 'None', 'children': []}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'report_path'}; {'id': '45', 'type': 'else_clause', 'children': ['46']}; {'id': '46', 'type': 'block', 'children': ['47']}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'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': 'os'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '56', 'type': 'argument_list', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '58', 'type': 'string', 'children': [], 'value': "'confindr'"}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'confindr_report'}; {'id': '62', 'type': 'call', 'children': ['63', '68']}; {'id': '63', 'type': 'attribute', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '70', '71']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '70', 'type': 'string', 'children': [], 'value': "'confindr'"}; {'id': '71', 'type': 'string', 'children': [], 'value': "'confindr_report.csv'"}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'assignment', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'pipeline_report'}; {'id': '75', 'type': 'call', 'children': ['76', '81']}; {'id': '76', 'type': 'attribute', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '81', 'type': 'argument_list', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '83', 'type': 'string', 'children': [], 'value': "'confindr_report.csv'"}; {'id': '84', 'type': 'if_statement', 'children': ['85', '94']}; {'id': '85', 'type': 'not_operator', 'children': ['86']}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '92', 'type': 'argument_list', 'children': ['93']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'confindr_report'}; {'id': '94', 'type': 'block', 'children': ['95', '108', '113', '150', '159', '172', '185']}; {'id': '95', 'type': 'try_statement', 'children': ['96', '104']}; {'id': '96', 'type': 'block', 'children': ['97']}; {'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': 'shutil'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'rmtree'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '104', 'type': 'except_clause', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '106', 'type': 'block', 'children': ['107']}; {'id': '107', 'type': 'pass_statement', 'children': []}; {'id': '108', 'type': 'expression_statement', 'children': ['109']}; {'id': '109', 'type': 'call', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'make_path'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'systemcall'}; {'id': '116', 'type': 'call', 'children': ['117', '121']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119', '120']}; {'id': '118', 'type': 'string', 'children': [], 'value': "'confindr.py -i {input_dir} -o {output_dir} -d {database_dir} -bf 0.05'"}; {'id': '119', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '121', 'type': 'argument_list', 'children': ['122', '125', '136']}; {'id': '122', 'type': 'keyword_argument', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '125', 'type': 'keyword_argument', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'output_dir'}; {'id': '127', 'type': 'call', 'children': ['128', '133']}; {'id': '128', 'type': 'attribute', 'children': ['129', '132']}; {'id': '129', 'type': 'attribute', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '133', 'type': 'argument_list', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'input_dir'}; {'id': '135', 'type': 'string', 'children': [], 'value': "'confindr'"}; {'id': '136', 'type': 'keyword_argument', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'database_dir'}; {'id': '138', 'type': 'call', 'children': ['139', '144']}; {'id': '139', 'type': 'attribute', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '144', 'type': 'argument_list', 'children': ['145', '148', '149']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'reffilepath'}; {'id': '148', 'type': 'string', 'children': [], 'value': "'ConFindr'"}; {'id': '149', 'type': 'string', 'children': [], 'value': "'databases'"}; {'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': 'out'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '155', 'type': 'call', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'run_subprocess'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'systemcall'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'write_to_logfile'}; {'id': '162', 'type': 'argument_list', 'children': ['163', '164', '165', '168', '169', '170', '171']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'systemcall'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'systemcall'}; {'id': '165', 'type': 'attribute', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'logfile'}; {'id': '168', 'type': 'None', 'children': []}; {'id': '169', 'type': 'None', 'children': []}; {'id': '170', 'type': 'None', 'children': []}; {'id': '171', 'type': 'None', 'children': []}; {'id': '172', 'type': 'expression_statement', 'children': ['173']}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'write_to_logfile'}; {'id': '175', 'type': 'argument_list', 'children': ['176', '177', '178', '181', '182', '183', '184']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'logfile'}; {'id': '181', 'type': 'None', 'children': []}; {'id': '182', 'type': 'None', 'children': []}; {'id': '183', 'type': 'None', 'children': []}; {'id': '184', 'type': 'None', 'children': []}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'call', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '190', 'type': 'argument_list', 'children': ['191']}; {'id': '191', 'type': 'string', 'children': [], 'value': "'Contamination detection complete!'"}; {'id': '192', 'type': 'expression_statement', 'children': ['193']}; {'id': '193', 'type': 'assignment', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '195', 'type': 'call', 'children': ['196', '209']}; {'id': '196', 'type': 'attribute', 'children': ['197', '208']}; {'id': '197', 'type': 'attribute', 'children': ['198', '207']}; {'id': '198', 'type': 'call', 'children': ['199', '202']}; {'id': '199', 'type': 'attribute', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'pandas'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'read_csv'}; {'id': '202', 'type': 'argument_list', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'confindr_report'}; {'id': '204', 'type': 'keyword_argument', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'index_col'}; {'id': '206', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'T'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'to_dict'}; {'id': '209', 'type': 'argument_list', 'children': []}; {'id': '210', 'type': 'for_statement', 'children': ['211', '212', '215']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '215', 'type': 'block', 'children': ['216', '224']}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'assignment', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '221', 'type': 'call', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'GenObject'}; {'id': '223', 'type': 'argument_list', 'children': []}; {'id': '224', 'type': 'for_statement', 'children': ['225', '226', '227']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '227', 'type': 'block', 'children': ['228']}; {'id': '228', 'type': 'if_statement', 'children': ['229', '234']}; {'id': '229', 'type': 'comparison_operator', 'children': ['230', '233'], 'value': 'in'}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '234', 'type': 'block', 'children': ['235', '260', '272', '284', '322', '361']}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '242']}; {'id': '237', 'type': 'attribute', 'children': ['238', '241']}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'genus'}; {'id': '242', 'type': 'conditional_expression', 'children': ['243', '248', '259'], 'value': 'if'}; {'id': '243', 'type': 'subscript', 'children': ['244', '247']}; {'id': '244', 'type': 'subscript', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '247', 'type': 'string', 'children': [], 'value': "'Genus'"}; {'id': '248', 'type': 'comparison_operator', 'children': ['249', '257', '258'], 'value': 'is'}; {'id': '249', 'type': 'call', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '251', 'type': 'argument_list', 'children': ['252']}; {'id': '252', 'type': 'subscript', 'children': ['253', '256']}; {'id': '253', 'type': 'subscript', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '256', 'type': 'string', 'children': [], 'value': "'Genus'"}; {'id': '257', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '259', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '260', 'type': 'expression_statement', 'children': ['261']}; {'id': '261', 'type': 'assignment', 'children': ['262', '267']}; {'id': '262', 'type': 'attribute', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'num_contaminated_snvs'}; {'id': '267', 'type': 'subscript', 'children': ['268', '271']}; {'id': '268', 'type': 'subscript', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '271', 'type': 'string', 'children': [], 'value': "'NumContamSNVs'"}; {'id': '272', 'type': 'expression_statement', 'children': ['273']}; {'id': '273', 'type': 'assignment', 'children': ['274', '279']}; {'id': '274', 'type': 'attribute', 'children': ['275', '278']}; {'id': '275', 'type': 'attribute', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '279', 'type': 'subscript', 'children': ['280', '283']}; {'id': '280', 'type': 'subscript', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '283', 'type': 'string', 'children': [], 'value': "'ContamStatus'"}; {'id': '284', 'type': 'try_statement', 'children': ['285', '311']}; {'id': '285', 'type': 'block', 'children': ['286']}; {'id': '286', 'type': 'expression_statement', 'children': ['287']}; {'id': '287', 'type': 'assignment', 'children': ['288', '293']}; {'id': '288', 'type': 'attribute', 'children': ['289', '292']}; {'id': '289', 'type': 'attribute', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'percent_contam'}; {'id': '293', 'type': 'conditional_expression', 'children': ['294', '299', '300', '310'], 'value': 'if'}; {'id': '294', 'type': 'subscript', 'children': ['295', '298']}; {'id': '295', 'type': 'subscript', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '298', 'type': 'string', 'children': [], 'value': "'PercentContam'"}; {'id': '299', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '300', 'type': 'comparison_operator', 'children': ['301', '309'], 'value': '!='}; {'id': '301', 'type': 'call', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '303', 'type': 'argument_list', 'children': ['304']}; {'id': '304', 'type': 'subscript', 'children': ['305', '308']}; {'id': '305', 'type': 'subscript', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '308', 'type': 'string', 'children': [], 'value': "'PercentContam'"}; {'id': '309', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '310', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '311', 'type': 'except_clause', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '313', 'type': 'block', 'children': ['314']}; {'id': '314', 'type': 'expression_statement', 'children': ['315']}; {'id': '315', 'type': 'assignment', 'children': ['316', '321']}; {'id': '316', 'type': 'attribute', 'children': ['317', '320']}; {'id': '317', 'type': 'attribute', 'children': ['318', '319']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'percent_contam'}; {'id': '321', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '322', 'type': 'try_statement', 'children': ['323', '350']}; {'id': '323', 'type': 'block', 'children': ['324']}; {'id': '324', 'type': 'expression_statement', 'children': ['325']}; {'id': '325', 'type': 'assignment', 'children': ['326', '331', '332']}; {'id': '326', 'type': 'attribute', 'children': ['327', '330']}; {'id': '327', 'type': 'attribute', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'percent_contam_std'}; {'id': '331', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '332', 'type': 'conditional_expression', 'children': ['333', '338', '339', '349'], 'value': 'if'}; {'id': '333', 'type': 'subscript', 'children': ['334', '337']}; {'id': '334', 'type': 'subscript', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '337', 'type': 'string', 'children': [], 'value': "'PercentContamStandardDeviation'"}; {'id': '338', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '339', 'type': 'comparison_operator', 'children': ['340', '348'], 'value': '!='}; {'id': '340', 'type': 'call', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '342', 'type': 'argument_list', 'children': ['343']}; {'id': '343', 'type': 'subscript', 'children': ['344', '347']}; {'id': '344', 'type': 'subscript', 'children': ['345', '346']}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'confindr_results'}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '347', 'type': 'string', 'children': [], 'value': "'PercentContamStandardDeviation'"}; {'id': '348', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '349', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '350', 'type': 'except_clause', 'children': ['351', '352']}; {'id': '351', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '352', 'type': 'block', 'children': ['353']}; {'id': '353', 'type': 'expression_statement', 'children': ['354']}; {'id': '354', 'type': 'assignment', 'children': ['355', '360']}; {'id': '355', 'type': 'attribute', 'children': ['356', '359']}; {'id': '356', 'type': 'attribute', 'children': ['357', '358']}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'percent_contam_std'}; {'id': '360', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '361', 'type': 'if_statement', 'children': ['362', '369', '378']}; {'id': '362', 'type': 'comparison_operator', 'children': ['363', '368'], 'value': 'is'}; {'id': '363', 'type': 'attribute', 'children': ['364', '367']}; {'id': '364', 'type': 'attribute', 'children': ['365', '366']}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '368', 'type': 'True', 'children': []}; {'id': '369', 'type': 'block', 'children': ['370']}; {'id': '370', 'type': 'expression_statement', 'children': ['371']}; {'id': '371', 'type': 'assignment', 'children': ['372', '377']}; {'id': '372', 'type': 'attribute', 'children': ['373', '376']}; {'id': '373', 'type': 'attribute', 'children': ['374', '375']}; {'id': '374', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '377', 'type': 'string', 'children': [], 'value': "'Contaminated'"}; {'id': '378', 'type': 'elif_clause', 'children': ['379', '386']}; {'id': '379', 'type': 'comparison_operator', 'children': ['380', '385'], 'value': 'is'}; {'id': '380', 'type': 'attribute', 'children': ['381', '384']}; {'id': '381', 'type': 'attribute', 'children': ['382', '383']}; {'id': '382', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '385', 'type': 'False', 'children': []}; {'id': '386', 'type': 'block', 'children': ['387']}; {'id': '387', 'type': 'expression_statement', 'children': ['388']}; {'id': '388', 'type': 'assignment', 'children': ['389', '394']}; {'id': '389', 'type': 'attribute', 'children': ['390', '393']}; {'id': '390', 'type': 'attribute', 'children': ['391', '392']}; {'id': '391', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '393', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '394', 'type': 'string', 'children': [], 'value': "'Clean'"}; {'id': '395', 'type': 'with_statement', 'children': ['396', '406']}; {'id': '396', 'type': 'with_clause', 'children': ['397']}; {'id': '397', 'type': 'with_item', 'children': ['398']}; {'id': '398', 'type': 'as_pattern', 'children': ['399', '404']}; {'id': '399', 'type': 'call', 'children': ['400', '401']}; {'id': '400', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '401', 'type': 'argument_list', 'children': ['402', '403']}; {'id': '402', 'type': 'identifier', 'children': [], 'value': 'pipeline_report'}; {'id': '403', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '404', 'type': 'as_pattern_target', 'children': ['405']}; {'id': '405', 'type': 'identifier', 'children': [], 'value': 'csv'}; {'id': '406', 'type': 'block', 'children': ['407', '411', '465']}; {'id': '407', 'type': 'expression_statement', 'children': ['408']}; {'id': '408', 'type': 'assignment', 'children': ['409', '410']}; {'id': '409', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '410', 'type': 'string', 'children': [], 'value': "'Strain,Genus,NumContamSNVs,ContamStatus,PercentContam,PercentContamSTD\\n'"}; {'id': '411', 'type': 'for_statement', 'children': ['412', '413', '416']}; {'id': '412', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '413', 'type': 'attribute', 'children': ['414', '415']}; {'id': '414', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '415', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '416', 'type': 'block', 'children': ['417']}; {'id': '417', 'type': 'expression_statement', 'children': ['418']}; {'id': '418', 'type': 'augmented_assignment', 'children': ['419', '420'], 'value': '+='}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '420', 'type': 'call', 'children': ['421', '424']}; {'id': '421', 'type': 'attribute', 'children': ['422', '423']}; {'id': '422', 'type': 'string', 'children': [], 'value': "'{str},{genus},{numcontamsnv},{status},{pc},{pcs}\\n'"}; {'id': '423', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '424', 'type': 'argument_list', 'children': ['425', '430', '437', '444', '451', '458']}; {'id': '425', 'type': 'keyword_argument', 'children': ['426', '427']}; {'id': '426', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '427', 'type': 'attribute', 'children': ['428', '429']}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '429', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '430', 'type': 'keyword_argument', 'children': ['431', '432']}; {'id': '431', 'type': 'identifier', 'children': [], 'value': 'genus'}; {'id': '432', 'type': 'attribute', 'children': ['433', '436']}; {'id': '433', 'type': 'attribute', 'children': ['434', '435']}; {'id': '434', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '435', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '436', 'type': 'identifier', 'children': [], 'value': 'genus'}; {'id': '437', 'type': 'keyword_argument', 'children': ['438', '439']}; {'id': '438', 'type': 'identifier', 'children': [], 'value': 'numcontamsnv'}; {'id': '439', 'type': 'attribute', 'children': ['440', '443']}; {'id': '440', 'type': 'attribute', 'children': ['441', '442']}; {'id': '441', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '442', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '443', 'type': 'identifier', 'children': [], 'value': 'num_contaminated_snvs'}; {'id': '444', 'type': 'keyword_argument', 'children': ['445', '446']}; {'id': '445', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '446', 'type': 'attribute', 'children': ['447', '450']}; {'id': '447', 'type': 'attribute', 'children': ['448', '449']}; {'id': '448', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '449', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '450', 'type': 'identifier', 'children': [], 'value': 'contam_status'}; {'id': '451', 'type': 'keyword_argument', 'children': ['452', '453']}; {'id': '452', 'type': 'identifier', 'children': [], 'value': 'pc'}; {'id': '453', 'type': 'attribute', 'children': ['454', '457']}; {'id': '454', 'type': 'attribute', 'children': ['455', '456']}; {'id': '455', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '456', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '457', 'type': 'identifier', 'children': [], 'value': 'percent_contam'}; {'id': '458', 'type': 'keyword_argument', 'children': ['459', '460']}; {'id': '459', 'type': 'identifier', 'children': [], 'value': 'pcs'}; {'id': '460', 'type': 'attribute', 'children': ['461', '464']}; {'id': '461', 'type': 'attribute', 'children': ['462', '463']}; {'id': '462', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '463', 'type': 'identifier', 'children': [], 'value': 'confindr'}; {'id': '464', 'type': 'identifier', 'children': [], 'value': 'percent_contam_std'}; {'id': '465', 'type': 'expression_statement', 'children': ['466']}; {'id': '466', 'type': 'call', 'children': ['467', '470']}; {'id': '467', 'type': 'attribute', 'children': ['468', '469']}; {'id': '468', 'type': 'identifier', 'children': [], 'value': 'csv'}; {'id': '469', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '470', 'type': 'argument_list', 'children': ['471']}; {'id': '471', 'type': 'identifier', 'children': [], 'value': 'data'}
Helper function to get confindr integrated into the assembly pipeline
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'corewriter'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '243', '288']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'printtime'}; {'id': '9', 'type': 'argument_list', 'children': ['10', '11']}; {'id': '10', 'type': 'string', 'children': [], 'value': "'Creating core allele files'"}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '14', 'type': 'for_statement', 'children': ['15', '16', '22']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'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': 'genesequence'}; {'id': '22', 'type': 'block', 'children': ['23', '32', '51']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'call', 'children': ['25', '30']}; {'id': '25', 'type': 'attribute', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'geneset'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'genefile'}; {'id': '35', 'type': 'call', 'children': ['36', '41']}; {'id': '36', 'type': 'attribute', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'coregenelocation'}; {'id': '45', 'type': 'call', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'string', 'children': [], 'value': "'{}.fasta'"}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '51', 'type': 'if_statement', 'children': ['52', '61', '176']}; {'id': '52', 'type': 'not_operator', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '59']}; {'id': '54', 'type': 'attribute', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'genefile'}; {'id': '61', 'type': 'block', 'children': ['62']}; {'id': '62', 'type': 'with_statement', 'children': ['63', '73']}; {'id': '63', 'type': 'with_clause', 'children': ['64']}; {'id': '64', 'type': 'with_item', 'children': ['65']}; {'id': '65', 'type': 'as_pattern', 'children': ['66', '71']}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'genefile'}; {'id': '70', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '71', 'type': 'as_pattern_target', 'children': ['72']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'core'}; {'id': '73', 'type': 'block', 'children': ['74']}; {'id': '74', 'type': 'for_statement', 'children': ['75', '78', '86']}; {'id': '75', 'type': 'pattern_list', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'sequence'}; {'id': '78', 'type': 'call', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'subscript', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'genesequence'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '86', 'type': 'block', 'children': ['87', '99', '115', '124']}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'definitionline'}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'string', 'children': [], 'value': "'{}-{}'"}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '94', 'type': 'argument_list', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '96', 'type': 'binary_operator', 'children': ['97', '98'], 'value': '+'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '98', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'fasta'}; {'id': '102', 'type': 'call', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'SeqRecord'}; {'id': '104', 'type': 'argument_list', 'children': ['105', '109', '112']}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'Seq'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'sequence'}; {'id': '109', 'type': 'keyword_argument', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '111', 'type': 'string', 'children': [], 'value': "''"}; {'id': '112', 'type': 'keyword_argument', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'definitionline'}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'SeqIO'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '120', 'type': 'argument_list', 'children': ['121', '122', '123']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'fasta'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'core'}; {'id': '123', 'type': 'string', 'children': [], 'value': "'fasta'"}; {'id': '124', 'type': 'for_statement', 'children': ['125', '126', '131']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '126', 'type': 'subscript', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'coresequence'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'sequence'}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'try_statement', 'children': ['133', '155']}; {'id': '133', 'type': 'block', 'children': ['134']}; {'id': '134', 'type': 'expression_statement', 'children': ['135']}; {'id': '135', 'type': 'call', 'children': ['136', '148']}; {'id': '136', 'type': 'attribute', 'children': ['137', '147']}; {'id': '137', 'type': 'subscript', 'children': ['138', '141']}; {'id': '138', 'type': 'attribute', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '141', 'type': 'subscript', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '143', 'type': 'slice', 'children': ['144', '145']}; {'id': '144', 'type': 'colon', 'children': []}; {'id': '145', 'type': 'unary_operator', 'children': ['146'], 'value': '-'}; {'id': '146', 'type': 'integer', 'children': [], 'value': '6'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'dictionary', 'children': ['150']}; {'id': '150', 'type': 'pair', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '152', 'type': 'binary_operator', 'children': ['153', '154'], 'value': '+'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '154', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '155', 'type': 'except_clause', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'assignment', 'children': ['160', '170']}; {'id': '160', 'type': 'subscript', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '164', 'type': 'subscript', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '166', 'type': 'slice', 'children': ['167', '168']}; {'id': '167', 'type': 'colon', 'children': []}; {'id': '168', 'type': 'unary_operator', 'children': ['169'], 'value': '-'}; {'id': '169', 'type': 'integer', 'children': [], 'value': '6'}; {'id': '170', 'type': 'dictionary', 'children': ['171']}; {'id': '171', 'type': 'pair', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '173', 'type': 'binary_operator', 'children': ['174', '175'], 'value': '+'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '175', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '176', 'type': 'else_clause', 'children': ['177']}; {'id': '177', 'type': 'block', 'children': ['178']}; {'id': '178', 'type': 'for_statement', 'children': ['179', '182', '190']}; {'id': '179', 'type': 'pattern_list', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'sequence'}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'subscript', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'genesequence'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '190', 'type': 'block', 'children': ['191']}; {'id': '191', 'type': 'for_statement', 'children': ['192', '193', '198']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '193', 'type': 'subscript', 'children': ['194', '197']}; {'id': '194', 'type': 'attribute', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'coresequence'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'sequence'}; {'id': '198', 'type': 'block', 'children': ['199']}; {'id': '199', 'type': 'try_statement', 'children': ['200', '222']}; {'id': '200', 'type': 'block', 'children': ['201']}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'call', 'children': ['203', '215']}; {'id': '203', 'type': 'attribute', 'children': ['204', '214']}; {'id': '204', 'type': 'subscript', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '208', 'type': 'subscript', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '210', 'type': 'slice', 'children': ['211', '212']}; {'id': '211', 'type': 'colon', 'children': []}; {'id': '212', 'type': 'unary_operator', 'children': ['213'], 'value': '-'}; {'id': '213', 'type': 'integer', 'children': [], 'value': '6'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '215', 'type': 'argument_list', 'children': ['216']}; {'id': '216', 'type': 'dictionary', 'children': ['217']}; {'id': '217', 'type': 'pair', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '219', 'type': 'binary_operator', 'children': ['220', '221'], 'value': '+'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '221', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '222', 'type': 'except_clause', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '224', 'type': 'block', 'children': ['225']}; {'id': '225', 'type': 'expression_statement', 'children': ['226']}; {'id': '226', 'type': 'assignment', 'children': ['227', '237']}; {'id': '227', 'type': 'subscript', 'children': ['228', '231']}; {'id': '228', 'type': 'attribute', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '231', 'type': 'subscript', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '233', 'type': 'slice', 'children': ['234', '235']}; {'id': '234', 'type': 'colon', 'children': []}; {'id': '235', 'type': 'unary_operator', 'children': ['236'], 'value': '-'}; {'id': '236', 'type': 'integer', 'children': [], 'value': '6'}; {'id': '237', 'type': 'dictionary', 'children': ['238']}; {'id': '238', 'type': 'pair', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '240', 'type': 'binary_operator', 'children': ['241', '242'], 'value': '+'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '242', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '243', 'type': 'if_statement', 'children': ['244', '263']}; {'id': '244', 'type': 'not_operator', 'children': ['245']}; {'id': '245', 'type': 'call', 'children': ['246', '251']}; {'id': '246', 'type': 'attribute', 'children': ['247', '250']}; {'id': '247', 'type': 'attribute', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '251', 'type': 'argument_list', 'children': ['252']}; {'id': '252', 'type': 'call', 'children': ['253', '258']}; {'id': '253', 'type': 'attribute', 'children': ['254', '257']}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'join'}; {'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': 'coregenelocation'}; {'id': '262', 'type': 'string', 'children': [], 'value': "'core_combined.fasta'"}; {'id': '263', 'type': 'block', 'children': ['264', '281']}; {'id': '264', 'type': 'expression_statement', 'children': ['265']}; {'id': '265', 'type': 'assignment', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'fastafiles'}; {'id': '267', 'type': 'call', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '269', 'type': 'argument_list', 'children': ['270']}; {'id': '270', 'type': 'call', 'children': ['271', '276']}; {'id': '271', 'type': 'attribute', 'children': ['272', '275']}; {'id': '272', 'type': 'attribute', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '276', 'type': 'argument_list', 'children': ['277', '280']}; {'id': '277', 'type': 'attribute', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'coregenelocation'}; {'id': '280', 'type': 'string', 'children': [], 'value': "'*.fasta'"}; {'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': 'self'}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'combinealleles'}; {'id': '286', 'type': 'argument_list', 'children': ['287']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'fastafiles'}; {'id': '288', 'type': 'expression_statement', 'children': ['289']}; {'id': '289', 'type': 'call', 'children': ['290', '293']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'profiler'}; {'id': '293', 'type': 'argument_list', 'children': []}
Creates .fasta files containing all alleles for each gene
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'profiler'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '43', '62', '66', '148', '184']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'printtime'}; {'id': '9', 'type': 'argument_list', 'children': ['10', '11']}; {'id': '10', 'type': 'string', 'children': [], 'value': "'Calculating core profiles'"}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '14', 'type': 'for_statement', 'children': ['15', '16', '19']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '19', 'type': 'block', 'children': ['20']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '27']}; {'id': '22', 'type': 'attribute', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'coreset'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'call', 'children': ['35', '42']}; {'id': '35', 'type': 'attribute', 'children': ['36', '41']}; {'id': '36', 'type': 'subscript', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '42', 'type': 'argument_list', 'children': []}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'string', 'children': [], 'value': "'ST,{}\\n'"}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'string', 'children': [], 'value': "','"}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'geneset'}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'assignment', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '65', 'type': 'string', 'children': [], 'value': "''"}; {'id': '66', 'type': 'for_statement', 'children': ['67', '70', '79']}; {'id': '67', 'type': 'pattern_list', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'core'}; {'id': '70', 'type': 'call', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '72', 'type': 'argument_list', 'children': ['73']}; {'id': '73', 'type': 'call', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'coreset'}; {'id': '79', 'type': 'block', 'children': ['80', '84', '93', '126', '144']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'augmented_assignment', 'children': ['82', '83'], 'value': '+='}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '83', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'augmented_assignment', 'children': ['86', '87'], 'value': '+='}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'string', 'children': [], 'value': "'{}'"}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '93', 'type': 'for_statement', 'children': ['94', '95', '98']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '98', 'type': 'block', 'children': ['99']}; {'id': '99', 'type': 'if_statement', 'children': ['100', '117']}; {'id': '100', 'type': 'comparison_operator', 'children': ['101', '116'], 'value': '=='}; {'id': '101', 'type': 'call', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '103', 'type': 'argument_list', 'children': ['104']}; {'id': '104', 'type': 'call', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'call', 'children': ['108', '115']}; {'id': '108', 'type': 'attribute', 'children': ['109', '114']}; {'id': '109', 'type': 'subscript', 'children': ['110', '113']}; {'id': '110', 'type': 'attribute', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'corealleles'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '115', 'type': 'argument_list', 'children': []}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'core'}; {'id': '117', 'type': 'block', 'children': ['118']}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'assignment', 'children': ['120', '125']}; {'id': '120', 'type': 'subscript', 'children': ['121', '124']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'profiles'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'strain'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '126', 'type': 'for_statement', 'children': ['127', '128', '132']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '128', 'type': 'call', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'core'}; {'id': '132', 'type': 'block', 'children': ['133']}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'augmented_assignment', 'children': ['135', '136'], 'value': '+='}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'string', 'children': [], 'value': "',{}'"}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'subscript', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '143', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'augmented_assignment', 'children': ['146', '147'], 'value': '+='}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '147', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '148', 'type': 'with_statement', 'children': ['149', '169']}; {'id': '149', 'type': 'with_clause', 'children': ['150']}; {'id': '150', 'type': 'with_item', 'children': ['151']}; {'id': '151', 'type': 'as_pattern', 'children': ['152', '167']}; {'id': '152', 'type': 'call', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '154', 'type': 'argument_list', 'children': ['155', '166']}; {'id': '155', 'type': 'call', 'children': ['156', '161']}; {'id': '156', 'type': 'attribute', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '161', 'type': 'argument_list', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'profilelocation'}; {'id': '165', 'type': 'string', 'children': [], 'value': "'profile.txt'"}; {'id': '166', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '167', 'type': 'as_pattern_target', 'children': ['168']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'profile'}; {'id': '169', 'type': 'block', 'children': ['170', '177']}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'call', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'profile'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'header'}; {'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': 'profile'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '184', 'type': 'expression_statement', 'children': ['185']}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'linker'}; {'id': '189', 'type': 'argument_list', 'children': []}
Calculates the core profile for each strain
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '12']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'check_tags'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'repos'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'ignore_existing'}; {'id': '8', 'type': 'False', 'children': []}; {'id': '9', 'type': 'default_parameter', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'fail_fast'}; {'id': '11', 'type': 'False', 'children': []}; {'id': '12', 'type': 'block', 'children': ['13', '28', '44', '59', '77', '81', '85', '89', '201', '232']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'string', 'children': [], 'value': '"looking for {n} tag(s):"'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'keyword_argument', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'list_comprehension', 'children': ['30', '41']}; {'id': '30', 'type': 'call', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'string', 'children': [], 'value': '" {t}"'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'keyword_argument', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '41', 'type': 'for_in_clause', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'call', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'call', 'children': ['49', '52']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'string', 'children': [], 'value': '"in {n} repo(s):"'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'keyword_argument', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '55', 'type': 'call', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '57', 'type': 'argument_list', 'children': ['58']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'repos'}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'list_comprehension', 'children': ['61', '74']}; {'id': '61', 'type': 'call', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'string', 'children': [], 'value': '" {r}"'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'keyword_argument', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'full_name'}; {'id': '74', 'type': 'for_in_clause', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'repos'}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'present_tags'}; {'id': '80', 'type': 'dictionary', 'children': []}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'assignment', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'absent_tags'}; {'id': '84', 'type': 'dictionary', 'children': []}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'problems'}; {'id': '88', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '89', 'type': 'for_statement', 'children': ['90', '91', '92']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'repos'}; {'id': '92', 'type': 'block', 'children': ['93', '101', '172', '184']}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'assignment', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'has_tags'}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'find_tags_in_repo'}; {'id': '98', 'type': 'argument_list', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '101', 'type': 'if_statement', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'has_tags'}; {'id': '103', 'type': 'block', 'children': ['104', '151']}; {'id': '104', 'type': 'if_statement', 'children': ['105', '107']}; {'id': '105', 'type': 'not_operator', 'children': ['106']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'ignore_existing'}; {'id': '107', 'type': 'block', 'children': ['108', '134', '139', '146']}; {'id': '108', 'type': 'expression_statement', 'children': ['109']}; {'id': '109', 'type': 'assignment', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'yikes'}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'GitTagExistsError'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'call', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'string', 'children': [], 'value': '"tag(s) {tag} already exists in repos {r}"'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '129']}; {'id': '119', 'type': 'keyword_argument', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '121', 'type': 'call', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'has_tags'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '128', 'type': 'argument_list', 'children': []}; {'id': '129', 'type': 'keyword_argument', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'full_name'}; {'id': '134', 'type': 'if_statement', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'fail_fast'}; {'id': '136', 'type': 'block', 'children': ['137']}; {'id': '137', 'type': 'raise_statement', 'children': ['138']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'yikes'}; {'id': '139', 'type': 'expression_statement', 'children': ['140']}; {'id': '140', 'type': 'call', 'children': ['141', '144']}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'problems'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '144', 'type': 'argument_list', 'children': ['145']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'yikes'}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '149', 'type': 'argument_list', 'children': ['150']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'yikes'}; {'id': '151', 'type': 'expression_statement', 'children': ['152']}; {'id': '152', 'type': 'assignment', 'children': ['153', '158']}; {'id': '153', 'type': 'subscript', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'present_tags'}; {'id': '155', 'type': 'attribute', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'full_name'}; {'id': '158', 'type': 'dictionary', 'children': ['159', '162']}; {'id': '159', 'type': 'pair', 'children': ['160', '161']}; {'id': '160', 'type': 'string', 'children': [], 'value': "'repo'"}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '162', 'type': 'pair', 'children': ['163', '164']}; {'id': '163', 'type': 'string', 'children': [], 'value': "'tags'"}; {'id': '164', 'type': 'call', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '166', 'type': 'argument_list', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'has_tags'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '171', 'type': 'argument_list', 'children': []}; {'id': '172', 'type': 'expression_statement', 'children': ['173']}; {'id': '173', 'type': 'assignment', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'missing_tags'}; {'id': '175', 'type': 'list_comprehension', 'children': ['176', '177', '180']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '177', 'type': 'for_in_clause', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'tags'}; {'id': '180', 'type': 'if_clause', 'children': ['181']}; {'id': '181', 'type': 'comparison_operator', 'children': ['182', '183'], 'value': 'not'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'has_tags'}; {'id': '184', 'type': 'if_statement', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'missing_tags'}; {'id': '186', 'type': 'block', 'children': ['187']}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '194']}; {'id': '189', 'type': 'subscript', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'absent_tags'}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'full_name'}; {'id': '194', 'type': 'dictionary', 'children': ['195', '198']}; {'id': '195', 'type': 'pair', 'children': ['196', '197']}; {'id': '196', 'type': 'string', 'children': [], 'value': "'repo'"}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '198', 'type': 'pair', 'children': ['199', '200']}; {'id': '199', 'type': 'string', 'children': [], 'value': "'need_tags'"}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'missing_tags'}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'call', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '204', 'type': 'argument_list', 'children': ['205']}; {'id': '205', 'type': 'call', 'children': ['206', '213']}; {'id': '206', 'type': 'attribute', 'children': ['207', '212']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'textwrap'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'dedent'}; {'id': '211', 'type': 'argument_list', 'children': []}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '213', 'type': 'argument_list', 'children': ['214', '220', '226']}; {'id': '214', 'type': 'keyword_argument', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'n_with'}; {'id': '216', 'type': 'call', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '218', 'type': 'argument_list', 'children': ['219']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'present_tags'}; {'id': '220', 'type': 'keyword_argument', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'n_none'}; {'id': '222', 'type': 'call', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '224', 'type': 'argument_list', 'children': ['225']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'absent_tags'}; {'id': '226', 'type': 'keyword_argument', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'errors'}; {'id': '228', 'type': 'call', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'problems'}; {'id': '232', 'type': 'return_statement', 'children': ['233']}; {'id': '233', 'type': 'expression_list', 'children': ['234', '235', '236']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'present_tags'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'absent_tags'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'problems'}
check if tags already exist in repos
{'id': '0', 'type': 'module', 'children': ['1', '42', '44', '46', '48', '50', '52', '54', '56', '58', '61', '82']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8', '37', '39']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'getmlsthelper'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'referencefilepath'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '8', 'type': 'ERROR', 'children': ['9', '36']}; {'id': '9', 'type': 'ERROR', 'children': ['10', '16', '22', '31', '32', '33', '35']}; {'id': '10', 'type': 'import_from_statement', 'children': ['11', '14']}; {'id': '11', 'type': 'dotted_name', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'accessoryFunctions'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'accessoryFunctions'}; {'id': '14', 'type': 'dotted_name', 'children': ['15']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'GenObject'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'organismset'}; {'id': '19', 'type': 'call', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'set'}; {'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': 'organism'}; {'id': '25', 'type': 'conditional_expression', 'children': ['26', '27', '30'], 'value': 'if'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '29'], 'value': '!='}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '29', 'type': 'string', 'children': [], 'value': "'Shigella'"}; {'id': '30', 'type': 'string', 'children': [], 'value': "'Escherichia'"}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'organismdictionary'}; {'id': '32', 'type': 'string', 'children': [], 'value': "'Escherichia'"}; {'id': '33', 'type': 'ERROR', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'Escherichia'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'coli'}; {'id': '36', 'type': 'string', 'children': [], 'value': "'Shigella'"}; {'id': '37', 'type': 'ERROR', 'children': ['38']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'Escherichia'}; {'id': '39', 'type': 'block', 'children': ['40']}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'coli'}; {'id': '42', 'type': 'ERROR', 'children': ['43']}; {'id': '43', 'type': 'string', 'children': [], 'value': "'Vibrio'"}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'string', 'children': [], 'value': "'Vibrio parahaemolyticus'"}; {'id': '46', 'type': 'ERROR', 'children': ['47']}; {'id': '47', 'type': 'string', 'children': [], 'value': "'Campylobacter'"}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'string', 'children': [], 'value': "'Campylobacter jejuni'"}; {'id': '50', 'type': 'ERROR', 'children': ['51']}; {'id': '51', 'type': 'string', 'children': [], 'value': "'Listeria'"}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'string', 'children': [], 'value': "'Listeria monocytogenes'"}; {'id': '54', 'type': 'ERROR', 'children': ['55']}; {'id': '55', 'type': 'string', 'children': [], 'value': "'Bacillus'"}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'string', 'children': [], 'value': "'Bacillus cereus'"}; {'id': '58', 'type': 'ERROR', 'children': ['59', '60']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'Klebsiella'"}; {'id': '60', 'type': 'string', 'children': [], 'value': "'Klebsiella pneumoniae'"}; {'id': '61', 'type': 'try_statement', 'children': ['62', '72']}; {'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': 'organismset'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'subscript', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'organismdictionary'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '72', 'type': 'except_clause', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '74', 'type': 'block', 'children': ['75']}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'organismset'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '82', 'type': 'for_statement', 'children': ['83', '84', '85', '384']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'scheme'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'organismset'}; {'id': '85', 'type': 'ERROR', 'children': ['86']}; {'id': '86', 'type': 'block', 'children': ['87', '100', '132', '142', '152', '284', '338', '382']}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'organismpath'}; {'id': '90', 'type': 'call', 'children': ['91', '96']}; {'id': '91', 'type': 'attribute', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '96', 'type': 'argument_list', 'children': ['97', '98', '99']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'referencefilepath'}; {'id': '98', 'type': 'string', 'children': [], 'value': "'MLST'"}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '100', 'type': 'try_statement', 'children': ['101', '125']}; {'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': 'lastfolder'}; {'id': '105', 'type': 'call', 'children': ['106', '123']}; {'id': '106', 'type': 'attribute', 'children': ['107', '122']}; {'id': '107', 'type': 'subscript', 'children': ['108', '120']}; {'id': '108', 'type': 'call', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '110', 'type': 'argument_list', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'call', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'string', 'children': [], 'value': "'{}/*/'"}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '118', 'type': 'argument_list', 'children': ['119']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'organismpath'}; {'id': '120', 'type': 'unary_operator', 'children': ['121'], 'value': '-'}; {'id': '121', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '125', 'type': 'except_clause', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '127', 'type': 'block', 'children': ['128']}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'assignment', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'lastfolder'}; {'id': '131', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'assignment', 'children': ['134', '138']}; {'id': '134', 'type': 'pattern_list', 'children': ['135', '136', '137']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'delta'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'foldersize'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'd1'}; {'id': '138', 'type': 'call', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'schemedate'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'lastfolder'}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'assignment', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '145', 'type': 'call', 'children': ['146', '149']}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'string', 'children': [], 'value': "'{}/{}'"}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '149', 'type': 'argument_list', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'organismpath'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'd1'}; {'id': '152', 'type': 'if_statement', 'children': ['153', '154', '278']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '154', 'type': 'block', 'children': ['155']}; {'id': '155', 'type': 'if_statement', 'children': ['156', '165', '272']}; {'id': '156', 'type': 'boolean_operator', 'children': ['157', '162'], 'value': 'or'}; {'id': '157', 'type': 'comparison_operator', 'children': ['158', '161'], 'value': '>'}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'delta'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'days'}; {'id': '161', 'type': 'integer', 'children': [], 'value': '7'}; {'id': '162', 'type': 'comparison_operator', 'children': ['163', '164'], 'value': '<'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'foldersize'}; {'id': '164', 'type': 'integer', 'children': [], 'value': '100'}; {'id': '165', 'type': 'block', 'children': ['166', '177', '183', '189', '195', '201', '207', '214', '221', '251']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'printtime'}; {'id': '169', 'type': 'argument_list', 'children': ['170', '176']}; {'id': '170', 'type': 'call', 'children': ['171', '174']}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'string', 'children': [], 'value': "'Downloading {} MLST scheme from pubmlst.org'"}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'organism'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '180', 'type': 'call', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'GenObject'}; {'id': '182', 'type': 'argument_list', 'children': []}; {'id': '183', 'type': 'expression_statement', 'children': ['184']}; {'id': '184', 'type': 'assignment', 'children': ['185', '188']}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'species'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'scheme'}; {'id': '189', 'type': 'expression_statement', 'children': ['190']}; {'id': '190', 'type': 'assignment', 'children': ['191', '194']}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'repository_url'}; {'id': '194', 'type': 'string', 'children': [], 'value': "'http://pubmlst.org/data/dbases.xml'"}; {'id': '195', 'type': 'expression_statement', 'children': ['196']}; {'id': '196', 'type': 'assignment', 'children': ['197', '200']}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'force_scheme_name'}; {'id': '200', 'type': 'False', 'children': []}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'assignment', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '207', 'type': 'expression_statement', 'children': ['208']}; {'id': '208', 'type': 'call', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'make_path'}; {'id': '210', 'type': 'argument_list', 'children': ['211']}; {'id': '211', 'type': 'attribute', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'call', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'getmlst'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'main'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'getmlstargs'}; {'id': '221', 'type': 'try_statement', 'children': ['222', '244']}; {'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': 'profilestart'}; {'id': '226', 'type': 'call', 'children': ['227', '243']}; {'id': '227', 'type': 'attribute', 'children': ['228', '242']}; {'id': '228', 'type': 'call', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'subscript', 'children': ['232', '241']}; {'id': '232', 'type': 'call', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '234', 'type': 'argument_list', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'string', 'children': [], 'value': "'{}/*.txt'"}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '239', 'type': 'argument_list', 'children': ['240']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '241', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '243', 'type': 'argument_list', 'children': []}; {'id': '244', 'type': 'except_clause', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '246', 'type': 'block', 'children': ['247']}; {'id': '247', 'type': 'expression_statement', 'children': ['248']}; {'id': '248', 'type': 'assignment', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'profilestart'}; {'id': '250', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '251', 'type': 'if_statement', 'children': ['252', '260']}; {'id': '252', 'type': 'boolean_operator', 'children': ['253', '255'], 'value': 'or'}; {'id': '253', 'type': 'not_operator', 'children': ['254']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'profilestart'}; {'id': '255', 'type': 'comparison_operator', 'children': ['256', '259'], 'value': '=='}; {'id': '256', 'type': 'subscript', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'profilestart'}; {'id': '258', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '259', 'type': 'string', 'children': [], 'value': "'<'"}; {'id': '260', 'type': 'block', 'children': ['261', '268']}; {'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': 'shutil'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'rmtree'}; {'id': '266', 'type': 'argument_list', 'children': ['267']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '268', 'type': 'expression_statement', 'children': ['269']}; {'id': '269', 'type': 'assignment', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'lastfolder'}; {'id': '272', 'type': 'else_clause', 'children': ['273']}; {'id': '273', 'type': 'block', 'children': ['274']}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'assignment', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'lastfolder'}; {'id': '278', 'type': 'else_clause', 'children': ['279']}; {'id': '279', 'type': 'block', 'children': ['280']}; {'id': '280', 'type': 'expression_statement', 'children': ['281']}; {'id': '281', 'type': 'assignment', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'lastfolder'}; {'id': '284', 'type': 'try_statement', 'children': ['285', '329']}; {'id': '285', 'type': 'block', 'children': ['286']}; {'id': '286', 'type': 'expression_statement', 'children': ['287']}; {'id': '287', 'type': 'assignment', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'newfoldersize'}; {'id': '289', 'type': 'call', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'sum'}; {'id': '291', 'type': 'generator_expression', 'children': ['292', '306', '314']}; {'id': '292', 'type': 'call', 'children': ['293', '298']}; {'id': '293', 'type': 'attribute', 'children': ['294', '297']}; {'id': '294', 'type': 'attribute', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'getsize'}; {'id': '298', 'type': 'argument_list', 'children': ['299']}; {'id': '299', 'type': 'call', 'children': ['300', '303']}; {'id': '300', 'type': 'attribute', 'children': ['301', '302']}; {'id': '301', 'type': 'string', 'children': [], 'value': "'{}/{}'"}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '303', 'type': 'argument_list', 'children': ['304', '305']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '306', 'type': 'for_in_clause', 'children': ['307', '308']}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '308', 'type': 'call', 'children': ['309', '312']}; {'id': '309', 'type': 'attribute', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'listdir'}; {'id': '312', 'type': 'argument_list', 'children': ['313']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '314', 'type': 'if_clause', 'children': ['315']}; {'id': '315', 'type': 'call', 'children': ['316', '321']}; {'id': '316', 'type': 'attribute', 'children': ['317', '320']}; {'id': '317', 'type': 'attribute', 'children': ['318', '319']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '321', 'type': 'argument_list', 'children': ['322']}; {'id': '322', 'type': 'call', 'children': ['323', '326']}; {'id': '323', 'type': 'attribute', 'children': ['324', '325']}; {'id': '324', 'type': 'string', 'children': [], 'value': "'{}/{}'"}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '326', 'type': 'argument_list', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '329', 'type': 'except_clause', 'children': ['330', '333']}; {'id': '330', 'type': 'tuple', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'OSError'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '333', 'type': 'block', 'children': ['334']}; {'id': '334', 'type': 'expression_statement', 'children': ['335']}; {'id': '335', 'type': 'assignment', 'children': ['336', '337']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'newfoldersize'}; {'id': '337', 'type': 'integer', 'children': [], 'value': '100'}; {'id': '338', 'type': 'if_statement', 'children': ['339', '342']}; {'id': '339', 'type': 'comparison_operator', 'children': ['340', '341'], 'value': '<'}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'newfoldersize'}; {'id': '341', 'type': 'integer', 'children': [], 'value': '100'}; {'id': '342', 'type': 'block', 'children': ['343', '350']}; {'id': '343', 'type': 'expression_statement', 'children': ['344']}; {'id': '344', 'type': 'call', 'children': ['345', '348']}; {'id': '345', 'type': 'attribute', 'children': ['346', '347']}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'shutil'}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'rmtree'}; {'id': '348', 'type': 'argument_list', 'children': ['349']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '350', 'type': 'try_statement', 'children': ['351', '375']}; {'id': '351', 'type': 'block', 'children': ['352']}; {'id': '352', 'type': 'expression_statement', 'children': ['353']}; {'id': '353', 'type': 'assignment', 'children': ['354', '355']}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '355', 'type': 'call', 'children': ['356', '373']}; {'id': '356', 'type': 'attribute', 'children': ['357', '372']}; {'id': '357', 'type': 'subscript', 'children': ['358', '370']}; {'id': '358', 'type': 'call', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '360', 'type': 'argument_list', 'children': ['361']}; {'id': '361', 'type': 'call', 'children': ['362', '363']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '363', 'type': 'argument_list', 'children': ['364']}; {'id': '364', 'type': 'call', 'children': ['365', '368']}; {'id': '365', 'type': 'attribute', 'children': ['366', '367']}; {'id': '366', 'type': 'string', 'children': [], 'value': "'{}/*/'"}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '368', 'type': 'argument_list', 'children': ['369']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'organismpath'}; {'id': '370', 'type': 'unary_operator', 'children': ['371'], 'value': '-'}; {'id': '371', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '372', 'type': 'identifier', 'children': [], 'value': 'rstrip'}; {'id': '373', 'type': 'argument_list', 'children': ['374']}; {'id': '374', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '375', 'type': 'except_clause', 'children': ['376', '377']}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '377', 'type': 'block', 'children': ['378']}; {'id': '378', 'type': 'expression_statement', 'children': ['379']}; {'id': '379', 'type': 'assignment', 'children': ['380', '381']}; {'id': '380', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'organismpath'}; {'id': '382', 'type': 'return_statement', 'children': ['383']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'newfolder'}; {'id': '384', 'type': 'block', 'children': [], 'value': ''}
Prepares to run the getmlst.py script provided in SRST2
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'readlist'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '50', '67', '75']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'printtime'}; {'id': '9', 'type': 'argument_list', 'children': ['10', '11']}; {'id': '10', 'type': 'string', 'children': [], 'value': "'Sorting reads'"}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '14', 'type': 'for_statement', 'children': ['15', '16', '22']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'range'}; {'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': 'cpus'}; {'id': '22', 'type': 'block', 'children': ['23', '37', '44']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'Thread'}; {'id': '28', 'type': 'argument_list', 'children': ['29', '34']}; {'id': '29', 'type': 'keyword_argument', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'listread'}; {'id': '34', 'type': 'keyword_argument', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '36', 'type': 'tuple', 'children': []}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'call', 'children': ['39', '42']}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'setDaemon'}; {'id': '42', 'type': 'argument_list', 'children': ['43']}; {'id': '43', 'type': 'True', 'children': []}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'call', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '49', 'type': 'argument_list', 'children': []}; {'id': '50', 'type': 'for_statement', 'children': ['51', '52', '57']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'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': 'runmetadata'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'samples'}; {'id': '57', 'type': 'block', 'children': ['58']}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'call', 'children': ['60', '65']}; {'id': '60', 'type': 'attribute', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'listqueue'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'put'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '74']}; {'id': '69', 'type': 'attribute', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'listqueue'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '74', 'type': 'argument_list', 'children': []}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'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': 'fastqfilter'}; {'id': '80', 'type': 'argument_list', 'children': []}
Sort the reads, and create lists to be used in creating sorted .fastq files
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'args'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '12', '18', '29', '35', '41', '47', '53', '59', '70', '76', '107', '326', '332', '363', '418']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'parameters'}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'OrderedDict'}; {'id': '17', 'type': 'argument_list', 'children': []}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '23']}; {'id': '20', 'type': 'subscript', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '22', 'type': 'string', 'children': [], 'value': "'help'"}; {'id': '23', 'type': 'call', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'HelpArg'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'keyword_argument', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'normalize_name'}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'normalize_name'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'get_arg_config'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'get_arg_config'}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'get_short_option'}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'get_short_option_for_arg'}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'get_long_option'}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'get_long_option_for_arg'}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'get_inverse_option'}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'get_inverse_option_for_arg'}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '62', 'type': 'set_comprehension', 'children': ['63', '67']}; {'id': '63', 'type': 'call', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'normalize_name'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '67', 'type': 'for_in_clause', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'assignment', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'used_short_options'}; {'id': '73', 'type': 'call', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '75', 'type': 'argument_list', 'children': []}; {'id': '76', 'type': 'for_statement', 'children': ['77', '78', '83']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '78', 'type': 'call', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '82', 'type': 'argument_list', 'children': []}; {'id': '83', 'type': 'block', 'children': ['84', '91', '97']}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '87', 'type': 'call', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'get_arg_config'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '99', 'type': 'block', 'children': ['100']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'used_short_options'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '107', 'type': 'for_statement', 'children': ['108', '111', '116']}; {'id': '108', 'type': 'pattern_list', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '115', 'type': 'argument_list', 'children': []}; {'id': '116', 'type': 'block', 'children': ['117', '124', '150', '154', '161', '167', '173', '179', '185', '191', '197', '203', '209', '215', '221', '227', '276']}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'assignment', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '120', 'type': 'call', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'normalize_name'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'assignment', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'skip'}; {'id': '127', 'type': '()', 'children': ['128']}; {'id': '128', 'type': 'boolean_operator', 'children': ['129', '143'], 'value': 'or'}; {'id': '129', 'type': 'boolean_operator', 'children': ['130', '136'], 'value': 'or'}; {'id': '130', 'type': 'call', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '136', 'type': 'comparison_operator', 'children': ['137', '140'], 'value': 'is'}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'kind'}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'VAR_KEYWORD'}; {'id': '143', 'type': 'comparison_operator', 'children': ['144', '147'], 'value': 'is'}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'kind'}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'KEYWORD_ONLY'}; {'id': '150', 'type': 'if_statement', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'skip'}; {'id': '152', 'type': 'block', 'children': ['153']}; {'id': '153', 'type': 'continue_statement', 'children': []}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '157', 'type': 'call', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'get_arg_config'}; {'id': '159', 'type': 'argument_list', 'children': ['160']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'assignment', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'container'}; {'id': '164', 'type': 'attribute', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'container'}; {'id': '167', 'type': 'expression_statement', 'children': ['168']}; {'id': '168', 'type': 'assignment', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '170', 'type': 'attribute', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '173', 'type': 'expression_statement', 'children': ['174']}; {'id': '174', 'type': 'assignment', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'assignment', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'inverse_help'}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'inverse_help'}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'assignment', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '194', 'type': 'attribute', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '197', 'type': 'expression_statement', 'children': ['198']}; {'id': '198', 'type': 'assignment', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '203', 'type': 'expression_statement', 'children': ['204']}; {'id': '204', 'type': 'assignment', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '206', 'type': 'attribute', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '209', 'type': 'expression_statement', 'children': ['210']}; {'id': '210', 'type': 'assignment', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '215', 'type': 'expression_statement', 'children': ['216']}; {'id': '216', 'type': 'assignment', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'annotation'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'assignment', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '224', 'type': 'attribute', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '227', 'type': 'if_statement', 'children': ['228', '233']}; {'id': '228', 'type': 'comparison_operator', 'children': ['229', '230'], 'value': 'is'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'empty'}; {'id': '233', 'type': 'block', 'children': ['234', '254', '265']}; {'id': '234', 'type': 'if_statement', 'children': ['235', '237']}; {'id': '235', 'type': 'not_operator', 'children': ['236']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '237', 'type': 'block', 'children': ['238', '247']}; {'id': '238', 'type': 'expression_statement', 'children': ['239']}; {'id': '239', 'type': 'assignment', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '241', 'type': 'call', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'get_short_option'}; {'id': '243', 'type': 'argument_list', 'children': ['244', '245', '246']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'used_short_options'}; {'id': '247', 'type': 'expression_statement', 'children': ['248']}; {'id': '248', 'type': 'call', 'children': ['249', '252']}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'used_short_options'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '252', 'type': 'argument_list', 'children': ['253']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '254', 'type': 'if_statement', 'children': ['255', '257']}; {'id': '255', 'type': 'not_operator', 'children': ['256']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '257', 'type': 'block', 'children': ['258']}; {'id': '258', 'type': 'expression_statement', 'children': ['259']}; {'id': '259', 'type': 'assignment', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '261', 'type': 'call', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'get_long_option'}; {'id': '263', 'type': 'argument_list', 'children': ['264']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '265', 'type': 'if_statement', 'children': ['266', '268']}; {'id': '266', 'type': 'not_operator', 'children': ['267']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '268', 'type': 'block', 'children': ['269']}; {'id': '269', 'type': 'expression_statement', 'children': ['270']}; {'id': '270', 'type': 'assignment', 'children': ['271', '272']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '272', 'type': 'call', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'get_inverse_option'}; {'id': '274', 'type': 'argument_list', 'children': ['275']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '276', 'type': 'expression_statement', 'children': ['277']}; {'id': '277', 'type': 'assignment', 'children': ['278', '281']}; {'id': '278', 'type': 'subscript', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '281', 'type': 'call', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'Arg'}; {'id': '283', 'type': 'argument_list', 'children': ['284', '287', '290', '293', '296', '299', '302', '305', '308', '311', '314', '317', '320', '323']}; {'id': '284', 'type': 'keyword_argument', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '287', 'type': 'keyword_argument', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'parameter'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '290', 'type': 'keyword_argument', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '293', 'type': 'keyword_argument', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'container'}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'container'}; {'id': '296', 'type': 'keyword_argument', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '299', 'type': 'keyword_argument', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '302', 'type': 'keyword_argument', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'choices'}; {'id': '305', 'type': 'keyword_argument', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '308', 'type': 'keyword_argument', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'inverse_help'}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'inverse_help'}; {'id': '311', 'type': 'keyword_argument', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'short_option'}; {'id': '314', 'type': 'keyword_argument', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'long_option'}; {'id': '317', 'type': 'keyword_argument', 'children': ['318', '319']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'inverse_option'}; {'id': '320', 'type': 'keyword_argument', 'children': ['321', '322']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '323', 'type': 'keyword_argument', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'nargs'}; {'id': '326', 'type': 'expression_statement', 'children': ['327']}; {'id': '327', 'type': 'assignment', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'option_map'}; {'id': '329', 'type': 'call', 'children': ['330', '331']}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'OrderedDict'}; {'id': '331', 'type': 'argument_list', 'children': []}; {'id': '332', 'type': 'for_statement', 'children': ['333', '334', '339']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '334', 'type': 'call', 'children': ['335', '338']}; {'id': '335', 'type': 'attribute', 'children': ['336', '337']}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '338', 'type': 'argument_list', 'children': []}; {'id': '339', 'type': 'block', 'children': ['340']}; {'id': '340', 'type': 'for_statement', 'children': ['341', '342', '345']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'option'}; {'id': '342', 'type': 'attribute', 'children': ['343', '344']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'options'}; {'id': '345', 'type': 'block', 'children': ['346', '354']}; {'id': '346', 'type': 'expression_statement', 'children': ['347']}; {'id': '347', 'type': 'call', 'children': ['348', '351']}; {'id': '348', 'type': 'attribute', 'children': ['349', '350']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'option_map'}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'setdefault'}; {'id': '351', 'type': 'argument_list', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'option'}; {'id': '353', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '354', 'type': 'expression_statement', 'children': ['355']}; {'id': '355', 'type': 'call', 'children': ['356', '361']}; {'id': '356', 'type': 'attribute', 'children': ['357', '360']}; {'id': '357', 'type': 'subscript', 'children': ['358', '359']}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'option_map'}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'option'}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '361', 'type': 'argument_list', 'children': ['362']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '363', 'type': 'for_statement', 'children': ['364', '367', '372']}; {'id': '364', 'type': 'pattern_list', 'children': ['365', '366']}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'option'}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'option_args'}; {'id': '367', 'type': 'call', 'children': ['368', '371']}; {'id': '368', 'type': 'attribute', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'option_map'}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '371', 'type': 'argument_list', 'children': []}; {'id': '372', 'type': 'block', 'children': ['373']}; {'id': '373', 'type': 'if_statement', 'children': ['374', '380']}; {'id': '374', 'type': 'comparison_operator', 'children': ['375', '379'], 'value': '>'}; {'id': '375', 'type': 'call', 'children': ['376', '377']}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '377', 'type': 'argument_list', 'children': ['378']}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'option_args'}; {'id': '379', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '380', 'type': 'block', 'children': ['381', '397', '402', '413']}; {'id': '381', 'type': 'expression_statement', 'children': ['382']}; {'id': '382', 'type': 'assignment', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '384', 'type': 'call', 'children': ['385', '388']}; {'id': '385', 'type': 'attribute', 'children': ['386', '387']}; {'id': '386', 'type': 'string', 'children': [], 'value': "', '"}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '388', 'type': 'generator_expression', 'children': ['389', '394']}; {'id': '389', 'type': 'attribute', 'children': ['390', '393']}; {'id': '390', 'type': 'attribute', 'children': ['391', '392']}; {'id': '391', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'parameter'}; {'id': '393', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '394', 'type': 'for_in_clause', 'children': ['395', '396']}; {'id': '395', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '396', 'type': 'identifier', 'children': [], 'value': 'option_args'}; {'id': '397', 'type': 'expression_statement', 'children': ['398']}; {'id': '398', 'type': 'assignment', 'children': ['399', '400']}; {'id': '399', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '400', 'type': '()', 'children': ['401']}; {'id': '401', 'type': 'string', 'children': [], 'value': "'Option {option} of command {self.name} maps to multiple parameters: {names}'"}; {'id': '402', 'type': 'expression_statement', 'children': ['403']}; {'id': '403', 'type': 'assignment', 'children': ['404', '405']}; {'id': '404', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '405', 'type': 'call', 'children': ['406', '409']}; {'id': '406', 'type': 'attribute', 'children': ['407', '408']}; {'id': '407', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '408', 'type': 'identifier', 'children': [], 'value': 'format_map'}; {'id': '409', 'type': 'argument_list', 'children': ['410']}; {'id': '410', 'type': 'call', 'children': ['411', '412']}; {'id': '411', 'type': 'identifier', 'children': [], 'value': 'locals'}; {'id': '412', 'type': 'argument_list', 'children': []}; {'id': '413', 'type': 'raise_statement', 'children': ['414']}; {'id': '414', 'type': 'call', 'children': ['415', '416']}; {'id': '415', 'type': 'identifier', 'children': [], 'value': 'CommandError'}; {'id': '416', 'type': 'argument_list', 'children': ['417']}; {'id': '417', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '418', 'type': 'return_statement', 'children': ['419']}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'args'}
Create args from function parameters.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'epcr_threads'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'formattedprimers'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'ampliconsize'}; {'id': '8', 'type': 'integer', 'children': [], 'value': '10000'}; {'id': '9', 'type': 'block', 'children': ['10', '52', '59', '294']}; {'id': '10', 'type': 'for_statement', 'children': ['11', '12', '15']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'if_statement', 'children': ['17', '24']}; {'id': '17', 'type': 'comparison_operator', 'children': ['18', '23'], 'value': '!='}; {'id': '18', 'type': 'attribute', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '23', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '24', 'type': 'block', 'children': ['25', '39', '46']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'Thread'}; {'id': '30', 'type': 'argument_list', 'children': ['31', '36']}; {'id': '31', 'type': 'keyword_argument', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'epcr'}; {'id': '36', 'type': 'keyword_argument', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '38', 'type': 'tuple', 'children': []}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'call', 'children': ['41', '44']}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'setDaemon'}; {'id': '44', 'type': 'argument_list', 'children': ['45']}; {'id': '45', 'type': 'True', 'children': []}; {'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': 'threads'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '51', 'type': 'argument_list', 'children': []}; {'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': 'logging'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '57', 'type': 'argument_list', 'children': ['58']}; {'id': '58', 'type': 'string', 'children': [], 'value': "'Running ePCR analyses'"}; {'id': '59', 'type': 'for_statement', 'children': ['60', '61', '64']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '64', 'type': 'block', 'children': ['65']}; {'id': '65', 'type': 'if_statement', 'children': ['66', '73']}; {'id': '66', 'type': 'comparison_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': 'sample'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '72', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '73', 'type': 'block', 'children': ['74', '85', '95', '119', '130', '150', '187', '217', '266', '283']}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'setattr'}; {'id': '77', 'type': 'argument_list', 'children': ['78', '79', '82']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '82', 'type': 'call', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'GenObject'}; {'id': '84', 'type': 'argument_list', 'children': []}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '94']}; {'id': '87', 'type': 'attribute', 'children': ['88', '93']}; {'id': '88', 'type': 'subscript', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'primers'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'formattedprimers'}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'assignment', 'children': ['97', '104']}; {'id': '97', 'type': 'attribute', 'children': ['98', '103']}; {'id': '98', 'type': 'subscript', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'reportdir'}; {'id': '104', 'type': 'call', 'children': ['105', '110']}; {'id': '105', 'type': 'attribute', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '110', 'type': 'argument_list', 'children': ['111', '116']}; {'id': '111', 'type': 'attribute', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'outputdirectory'}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'call', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'make_path'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'attribute', 'children': ['124', '129']}; {'id': '124', 'type': 'subscript', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '126', 'type': 'attribute', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'reportdir'}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'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': 'os'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '139', 'type': 'argument_list', 'children': ['140', '147']}; {'id': '140', 'type': 'attribute', 'children': ['141', '146']}; {'id': '141', 'type': 'subscript', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'reportdir'}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '157']}; {'id': '152', 'type': 'attribute', 'children': ['153', '156']}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'famap'}; {'id': '157', 'type': 'call', 'children': ['158', '162']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160', '161']}; {'id': '159', 'type': 'string', 'children': [], 'value': "'{famap} -b {outfile}.famap {fasta}'"}; {'id': '160', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '162', 'type': 'argument_list', 'children': ['163', '177', '180']}; {'id': '163', 'type': 'keyword_argument', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'famap'}; {'id': '165', 'type': 'call', 'children': ['166', '171']}; {'id': '166', 'type': 'attribute', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '171', 'type': 'argument_list', 'children': ['172', '175', '176']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'homepath'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'ePCR'"}; {'id': '176', 'type': 'string', 'children': [], 'value': "'famap'"}; {'id': '177', 'type': 'keyword_argument', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '180', 'type': 'keyword_argument', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'fasta'}; {'id': '182', 'type': 'attribute', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '194']}; {'id': '189', 'type': 'attribute', 'children': ['190', '193']}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'fahash'}; {'id': '194', 'type': 'call', 'children': ['195', '199']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197', '198']}; {'id': '196', 'type': 'string', 'children': [], 'value': "'{fahash} -b {outfile}.hash {outfile}.famap'"}; {'id': '197', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '199', 'type': 'argument_list', 'children': ['200', '214']}; {'id': '200', 'type': 'keyword_argument', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'fahash'}; {'id': '202', 'type': 'call', 'children': ['203', '208']}; {'id': '203', 'type': 'attribute', 'children': ['204', '207']}; {'id': '204', 'type': 'attribute', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '208', 'type': 'argument_list', 'children': ['209', '212', '213']}; {'id': '209', 'type': 'attribute', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'homepath'}; {'id': '212', 'type': 'string', 'children': [], 'value': "'ePCR'"}; {'id': '213', 'type': 'string', 'children': [], 'value': "'fahash'"}; {'id': '214', 'type': 'keyword_argument', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'assignment', 'children': ['219', '224']}; {'id': '219', 'type': 'attribute', 'children': ['220', '223']}; {'id': '220', 'type': 'attribute', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'epcr'}; {'id': '224', 'type': 'call', 'children': ['225', '231']}; {'id': '225', 'type': 'attribute', 'children': ['226', '229', '230']}; {'id': '226', 'type': 'concatenated_string', 'children': ['227', '228']}; {'id': '227', 'type': 'string', 'children': [], 'value': "'{rePCR} -S {outfile}.hash -r + -d 1-{ampsize} -n {mismatches} -g 0 -G -q '"}; {'id': '228', 'type': 'string', 'children': [], 'value': "'-o {outfile}.txt {primers}'"}; {'id': '229', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '231', 'type': 'argument_list', 'children': ['232', '246', '249', '252', '257']}; {'id': '232', 'type': 'keyword_argument', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'rePCR'}; {'id': '234', 'type': 'call', 'children': ['235', '240']}; {'id': '235', 'type': 'attribute', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '240', 'type': 'argument_list', 'children': ['241', '244', '245']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'homepath'}; {'id': '244', 'type': 'string', 'children': [], 'value': "'ePCR'"}; {'id': '245', 'type': 'string', 'children': [], 'value': "'re-PCR'"}; {'id': '246', 'type': 'keyword_argument', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '249', 'type': 'keyword_argument', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'ampsize'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'ampliconsize'}; {'id': '252', 'type': 'keyword_argument', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'mismatches'}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'mismatches'}; {'id': '257', 'type': 'keyword_argument', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'primers'}; {'id': '259', 'type': 'attribute', 'children': ['260', '265']}; {'id': '260', 'type': 'subscript', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '262', 'type': 'attribute', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'primers'}; {'id': '266', 'type': 'expression_statement', 'children': ['267']}; {'id': '267', 'type': 'assignment', 'children': ['268', '275']}; {'id': '268', 'type': 'attribute', 'children': ['269', '274']}; {'id': '269', 'type': 'subscript', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '271', 'type': 'attribute', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'resultsfile'}; {'id': '275', 'type': 'call', 'children': ['276', '279']}; {'id': '276', 'type': 'attribute', 'children': ['277', '278']}; {'id': '277', 'type': 'string', 'children': [], 'value': "'{of}.txt'"}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '279', 'type': 'argument_list', 'children': ['280']}; {'id': '280', 'type': 'keyword_argument', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'of'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '283', 'type': 'expression_statement', 'children': ['284']}; {'id': '284', 'type': 'call', 'children': ['285', '290']}; {'id': '285', 'type': 'attribute', 'children': ['286', '289']}; {'id': '286', 'type': 'attribute', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'epcrqueue'}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'put'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'tuple', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'outfile'}; {'id': '294', 'type': 'expression_statement', 'children': ['295']}; {'id': '295', 'type': 'call', 'children': ['296', '301']}; {'id': '296', 'type': 'attribute', 'children': ['297', '300']}; {'id': '297', 'type': 'attribute', 'children': ['298', '299']}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'epcrqueue'}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '301', 'type': 'argument_list', 'children': []}
Run ePCR in a multi-threaded fashion
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'aggregate'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '8', '11']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'report'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'reportset'}; {'id': '11', 'type': 'block', 'children': ['12', '32', '41', '45']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'printtime'}; {'id': '15', 'type': 'argument_list', 'children': ['16', '29']}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'Processing {}'"}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'subscript', 'children': ['22', '28']}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'report'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'string', 'children': [], 'value': "'.'"}; {'id': '28', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '35', 'type': 'conditional_expression', 'children': ['36', '37', '40'], 'value': 'if'}; {'id': '36', 'type': 'string', 'children': [], 'value': "''"}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '39'], 'value': '!='}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'report'}; {'id': '39', 'type': 'string', 'children': [], 'value': "'mlst.csv'"}; {'id': '40', 'type': 'string', 'children': [], 'value': "'Strain,Genus,SequenceType,Matches,1,2,3,4,5,6,7\\n'"}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '44', 'type': 'string', 'children': [], 'value': "''"}; {'id': '45', 'type': 'with_statement', 'children': ['46', '66']}; {'id': '46', 'type': 'with_clause', 'children': ['47']}; {'id': '47', 'type': 'with_item', 'children': ['48']}; {'id': '48', 'type': 'as_pattern', 'children': ['49', '64']}; {'id': '49', 'type': 'call', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '51', 'type': 'argument_list', 'children': ['52', '63']}; {'id': '52', 'type': 'call', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '58', 'type': 'argument_list', 'children': ['59', '62']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'report'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '64', 'type': 'as_pattern_target', 'children': ['65']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'aggregate'}; {'id': '66', 'type': 'block', 'children': ['67', '159', '166']}; {'id': '67', 'type': 'for_statement', 'children': ['68', '69', '74']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '69', 'type': 'attribute', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'runmetadata'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'samples'}; {'id': '74', 'type': 'block', 'children': ['75']}; {'id': '75', 'type': 'try_statement', 'children': ['76', '155']}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'with_statement', 'children': ['78', '100']}; {'id': '78', 'type': 'with_clause', 'children': ['79']}; {'id': '79', 'type': 'with_item', 'children': ['80']}; {'id': '80', 'type': 'as_pattern', 'children': ['81', '98']}; {'id': '81', 'type': 'call', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '83', 'type': 'argument_list', 'children': ['84', '97']}; {'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': 'os'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '90', 'type': 'argument_list', 'children': ['91', '96']}; {'id': '91', 'type': 'attribute', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'report'}; {'id': '97', 'type': 'string', 'children': [], 'value': "'r'"}; {'id': '98', 'type': 'as_pattern_target', 'children': ['99']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'runreport'}; {'id': '100', 'type': 'block', 'children': ['101']}; {'id': '101', 'type': 'if_statement', 'children': ['102', '104', '113']}; {'id': '102', 'type': 'not_operator', 'children': ['103']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '104', 'type': 'block', 'children': ['105']}; {'id': '105', 'type': 'expression_statement', 'children': ['106']}; {'id': '106', 'type': 'assignment', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '108', 'type': 'call', 'children': ['109', '112']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'runreport'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'readline'}; {'id': '112', 'type': 'argument_list', 'children': []}; {'id': '113', 'type': 'else_clause', 'children': ['114']}; {'id': '114', 'type': 'block', 'children': ['115']}; {'id': '115', 'type': 'for_statement', 'children': ['116', '117', '118']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'runreport'}; {'id': '118', 'type': 'block', 'children': ['119', '132']}; {'id': '119', 'type': 'if_statement', 'children': ['120', '127']}; {'id': '120', 'type': 'not_operator', 'children': ['121']}; {'id': '121', 'type': 'call', 'children': ['122', '125']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'endswith'}; {'id': '125', 'type': 'argument_list', 'children': ['126']}; {'id': '126', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '127', 'type': 'block', 'children': ['128']}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'augmented_assignment', 'children': ['130', '131'], 'value': '+='}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '131', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '132', 'type': 'if_statement', 'children': ['133', '150']}; {'id': '133', 'type': 'comparison_operator', 'children': ['134', '142'], 'value': '!='}; {'id': '134', 'type': 'subscript', 'children': ['135', '141']}; {'id': '135', 'type': 'call', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'string', 'children': [], 'value': "','"}; {'id': '141', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '142', 'type': 'subscript', 'children': ['143', '149']}; {'id': '143', 'type': 'call', 'children': ['144', '147']}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'header'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '147', 'type': 'argument_list', 'children': ['148']}; {'id': '148', 'type': 'string', 'children': [], 'value': "','"}; {'id': '149', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '150', 'type': 'block', 'children': ['151']}; {'id': '151', 'type': 'expression_statement', 'children': ['152']}; {'id': '152', 'type': 'augmented_assignment', 'children': ['153', '154'], 'value': '+='}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'row'}; {'id': '155', 'type': 'except_clause', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'pass_statement', 'children': []}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'aggregate'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'header'}; {'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': 'aggregate'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'data'}
Aggregate all reports of the same type into a master report
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_item'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'iterable'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '8', 'type': 'False', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10']}; {'id': '10', 'type': 'return_statement', 'children': ['11']}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '13', 'type': 'argument_list', 'children': ['14', '15', '21']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'iterable'}; {'id': '15', 'type': 'keyword_argument', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'itemgetter'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '21', 'type': 'keyword_argument', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'reverse'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'reverse'}
Sort the itertable according to the given number item.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'summary_reporter'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Creating MOB-recon summary report'"}; {'id': '13', 'type': 'with_statement', 'children': ['14', '34']}; {'id': '14', 'type': 'with_clause', 'children': ['15']}; {'id': '15', 'type': 'with_item', 'children': ['16']}; {'id': '16', 'type': 'as_pattern', 'children': ['17', '32']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '31']}; {'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', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'mob_recon_summary.csv'"}; {'id': '31', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '32', 'type': 'as_pattern_target', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'summary'}; {'id': '34', 'type': 'block', 'children': ['35', '41', '188']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '38', 'type': 'concatenated_string', 'children': ['39', '40']}; {'id': '39', 'type': 'string', 'children': [], 'value': "'Strain,Location,Contig,Incompatibility,IncompatibilityAccession,RelaxaseType,'"}; {'id': '40', 'type': 'string', 'children': [], 'value': "'MashNearestNeighbor,MashNeighborDistance\\n'"}; {'id': '41', 'type': 'for_statement', 'children': ['42', '43', '46']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '46', 'type': 'block', 'children': ['47', '59']}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '56']}; {'id': '49', 'type': 'attribute', 'children': ['50', '55']}; {'id': '50', 'type': 'subscript', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'pipelineresults'}; {'id': '56', 'type': 'call', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '58', 'type': 'argument_list', 'children': []}; {'id': '59', 'type': 'for_statement', 'children': ['60', '63', '74']}; {'id': '60', 'type': 'pattern_list', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'primarykey'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '63', 'type': 'call', 'children': ['64', '73']}; {'id': '64', 'type': 'attribute', 'children': ['65', '72']}; {'id': '65', 'type': 'attribute', 'children': ['66', '71']}; {'id': '66', 'type': 'subscript', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'report_dict'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '73', 'type': 'argument_list', 'children': []}; {'id': '74', 'type': 'block', 'children': ['75']}; {'id': '75', 'type': 'if_statement', 'children': ['76', '81']}; {'id': '76', 'type': 'comparison_operator', 'children': ['77', '80'], 'value': '!='}; {'id': '77', 'type': 'subscript', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '79', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '80', 'type': 'string', 'children': [], 'value': "'chromosome'"}; {'id': '81', 'type': 'block', 'children': ['82', '142', '146']}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'augmented_assignment', 'children': ['84', '85'], 'value': '+='}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'string', 'children': [], 'value': "','"}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '89', 'type': 'generator_expression', 'children': ['90', '108']}; {'id': '90', 'type': 'conditional_expression', 'children': ['91', '101', '107'], 'value': 'if'}; {'id': '91', 'type': 'call', 'children': ['92', '98']}; {'id': '92', 'type': 'attribute', 'children': ['93', '97']}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '98', 'type': 'argument_list', 'children': ['99', '100']}; {'id': '99', 'type': 'string', 'children': [], 'value': "','"}; {'id': '100', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '101', 'type': 'comparison_operator', 'children': ['102', '106'], 'value': '!='}; {'id': '102', 'type': 'call', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '104', 'type': 'argument_list', 'children': ['105']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '106', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '107', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '108', 'type': 'for_in_clause', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '110', 'type': 'list', 'children': ['111', '114', '117', '127', '130', '133', '136', '139'], 'value': "[\n sample.name,\n results['cluster_id'],\n results['contig_id'].split('|')[1],\n results['rep_type'],\n results['rep_type_accession'],\n results['relaxase_type'],\n results['mash_nearest_neighbor'],\n results['mash_neighbor_distance']]"}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '114', 'type': 'subscript', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '116', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '117', 'type': 'subscript', 'children': ['118', '126']}; {'id': '118', 'type': 'call', 'children': ['119', '124']}; {'id': '119', 'type': 'attribute', 'children': ['120', '123']}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'contig_id'"}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '124', 'type': 'argument_list', 'children': ['125']}; {'id': '125', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '126', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '127', 'type': 'subscript', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '129', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '130', 'type': 'subscript', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '132', 'type': 'string', 'children': [], 'value': "'rep_type_accession'"}; {'id': '133', 'type': 'subscript', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '135', 'type': 'string', 'children': [], 'value': "'relaxase_type'"}; {'id': '136', 'type': 'subscript', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '138', 'type': 'string', 'children': [], 'value': "'mash_nearest_neighbor'"}; {'id': '139', 'type': 'subscript', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '141', 'type': 'string', 'children': [], 'value': "'mash_neighbor_distance'"}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'augmented_assignment', 'children': ['144', '145'], 'value': '+='}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '145', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '159']}; {'id': '148', 'type': 'subscript', 'children': ['149', '156']}; {'id': '149', 'type': 'attribute', 'children': ['150', '155']}; {'id': '150', 'type': 'subscript', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'pipelineresults'}; {'id': '156', 'type': 'subscript', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '158', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '159', 'type': 'call', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '163', 'type': 'generator_expression', 'children': ['164', '182']}; {'id': '164', 'type': 'conditional_expression', 'children': ['165', '175', '181'], 'value': 'if'}; {'id': '165', 'type': 'call', 'children': ['166', '172']}; {'id': '166', 'type': 'attribute', 'children': ['167', '171']}; {'id': '167', 'type': 'call', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '169', 'type': 'argument_list', 'children': ['170']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '172', 'type': 'argument_list', 'children': ['173', '174']}; {'id': '173', 'type': 'string', 'children': [], 'value': "','"}; {'id': '174', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '175', 'type': 'comparison_operator', 'children': ['176', '180'], 'value': '!='}; {'id': '176', 'type': 'call', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '178', 'type': 'argument_list', 'children': ['179']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '180', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '181', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '182', 'type': 'for_in_clause', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '184', 'type': 'list', 'children': ['185'], 'value': "[\n results['rep_type']]"}; {'id': '185', 'type': 'subscript', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '187', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '188', 'type': 'expression_statement', 'children': ['189']}; {'id': '189', 'type': 'call', 'children': ['190', '193']}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'summary'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '193', 'type': 'argument_list', 'children': ['194']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'data'}
Parse individual MOB Recon reports into a summary report
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'amrsummary'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Creating AMR summary table from ResFinder and MOB-recon outputs'"}; {'id': '13', 'type': 'with_statement', 'children': ['14', '34']}; {'id': '14', 'type': 'with_clause', 'children': ['15']}; {'id': '15', 'type': 'with_item', 'children': ['16']}; {'id': '16', 'type': 'as_pattern', 'children': ['17', '32']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '31']}; {'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', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'amr_summary.csv'"}; {'id': '31', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '32', 'type': 'as_pattern_target', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'amr'}; {'id': '34', 'type': 'block', 'children': ['35', '39', '306']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '38', 'type': 'string', 'children': [], 'value': "'Strain,Gene,Allele,Resistance,PercentIdentity,Contig,Location,PlasmidIncompatibilitySets\\n'"}; {'id': '39', 'type': 'for_statement', 'children': ['40', '41', '44']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '44', 'type': 'block', 'children': ['45', '51', '135']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '48', 'type': 'call', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '50', 'type': 'argument_list', 'children': []}; {'id': '51', 'type': 'for_statement', 'children': ['52', '55', '66']}; {'id': '52', 'type': 'pattern_list', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'primarykey'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '55', 'type': 'call', 'children': ['56', '65']}; {'id': '56', 'type': 'attribute', 'children': ['57', '64']}; {'id': '57', 'type': 'attribute', 'children': ['58', '63']}; {'id': '58', 'type': 'subscript', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'report_dict'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '65', 'type': 'argument_list', 'children': []}; {'id': '66', 'type': 'block', 'children': ['67']}; {'id': '67', 'type': 'try_statement', 'children': ['68', '131']}; {'id': '68', 'type': 'block', 'children': ['69', '75', '100']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '72', 'type': 'subscript', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'assignment', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '78', 'type': 'conditional_expression', 'children': ['79', '91', '99'], 'value': 'if'}; {'id': '79', 'type': 'call', 'children': ['80', '88']}; {'id': '80', 'type': 'attribute', 'children': ['81', '87']}; {'id': '81', 'type': 'call', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '83', 'type': 'argument_list', 'children': ['84']}; {'id': '84', 'type': 'subscript', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '86', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '88', 'type': 'argument_list', 'children': ['89', '90']}; {'id': '89', 'type': 'string', 'children': [], 'value': "','"}; {'id': '90', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '91', 'type': 'comparison_operator', 'children': ['92', '98'], 'value': '!='}; {'id': '92', 'type': 'call', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '94', 'type': 'argument_list', 'children': ['95']}; {'id': '95', 'type': 'subscript', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '97', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '98', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '99', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '100', 'type': 'try_statement', 'children': ['101', '111']}; {'id': '101', 'type': 'block', 'children': ['102']}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'call', 'children': ['104', '109']}; {'id': '104', 'type': 'attribute', 'children': ['105', '108']}; {'id': '105', 'type': 'subscript', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '111', 'type': 'except_clause', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '113', 'type': 'block', 'children': ['114', '122']}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'assignment', 'children': ['116', '119']}; {'id': '116', 'type': 'subscript', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '121', 'type': 'argument_list', 'children': []}; {'id': '122', 'type': 'expression_statement', 'children': ['123']}; {'id': '123', 'type': 'call', 'children': ['124', '129']}; {'id': '124', 'type': 'attribute', 'children': ['125', '128']}; {'id': '125', 'type': 'subscript', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '129', 'type': 'argument_list', 'children': ['130']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '131', 'type': 'except_clause', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '133', 'type': 'block', 'children': ['134']}; {'id': '134', 'type': 'pass_statement', 'children': []}; {'id': '135', 'type': 'for_statement', 'children': ['136', '139', '150']}; {'id': '136', 'type': 'pattern_list', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'primarykey'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '139', 'type': 'call', 'children': ['140', '149']}; {'id': '140', 'type': 'attribute', 'children': ['141', '148']}; {'id': '141', 'type': 'attribute', 'children': ['142', '147']}; {'id': '142', 'type': 'subscript', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'report_dict'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '149', 'type': 'argument_list', 'children': []}; {'id': '150', 'type': 'block', 'children': ['151']}; {'id': '151', 'type': 'try_statement', 'children': ['152', '302']}; {'id': '152', 'type': 'block', 'children': ['153', '166', '192']}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '156', 'type': 'subscript', 'children': ['157', '165']}; {'id': '157', 'type': 'call', 'children': ['158', '163']}; {'id': '158', 'type': 'attribute', 'children': ['159', '162']}; {'id': '159', 'type': 'subscript', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '161', 'type': 'string', 'children': [], 'value': "'contig_id'"}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '163', 'type': 'argument_list', 'children': ['164']}; {'id': '164', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '165', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '166', 'type': 'if_statement', 'children': ['167', '180']}; {'id': '167', 'type': 'call', 'children': ['168', '178']}; {'id': '168', 'type': 'attribute', 'children': ['169', '177']}; {'id': '169', 'type': 'subscript', 'children': ['170', '176']}; {'id': '170', 'type': 'call', 'children': ['171', '174']}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '176', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '178', 'type': 'argument_list', 'children': ['179']}; {'id': '179', 'type': 'string', 'children': [], 'value': "'length'"}; {'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': 'contig'}; {'id': '184', 'type': 'subscript', 'children': ['185', '191']}; {'id': '185', 'type': 'call', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '189', 'type': 'argument_list', 'children': ['190']}; {'id': '190', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '191', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '192', 'type': 'for_statement', 'children': ['193', '194', '199']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'amr_result'}; {'id': '194', 'type': 'attribute', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'resfinder_assembled'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'sampledata'}; {'id': '199', 'type': 'block', 'children': ['200']}; {'id': '200', 'type': 'if_statement', 'children': ['201', '210']}; {'id': '201', 'type': 'comparison_operator', 'children': ['202', '203'], 'value': '=='}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '203', 'type': 'call', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '205', 'type': 'argument_list', 'children': ['206']}; {'id': '206', 'type': 'subscript', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'amr_result'}; {'id': '208', 'type': 'unary_operator', 'children': ['209'], 'value': '-'}; {'id': '209', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '210', 'type': 'block', 'children': ['211', '224']}; {'id': '211', 'type': 'expression_statement', 'children': ['212']}; {'id': '212', 'type': 'augmented_assignment', 'children': ['213', '214'], 'value': '+='}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '214', 'type': 'call', 'children': ['215', '218']}; {'id': '215', 'type': 'attribute', 'children': ['216', '217']}; {'id': '216', 'type': 'string', 'children': [], 'value': "'{sn},'"}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '218', 'type': 'argument_list', 'children': ['219']}; {'id': '219', 'type': 'keyword_argument', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'sn'}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '224', 'type': 'expression_statement', 'children': ['225']}; {'id': '225', 'type': 'augmented_assignment', 'children': ['226', '227'], 'value': '+='}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '227', 'type': 'call', 'children': ['228', '232']}; {'id': '228', 'type': 'attribute', 'children': ['229', '230', '231']}; {'id': '229', 'type': 'string', 'children': [], 'value': "'{amr},{mob}\\n'"}; {'id': '230', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '232', 'type': 'argument_list', 'children': ['233', '260']}; {'id': '233', 'type': 'keyword_argument', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'amr'}; {'id': '235', 'type': 'call', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'string', 'children': [], 'value': "','"}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '239', 'type': 'generator_expression', 'children': ['240', '252']}; {'id': '240', 'type': 'conditional_expression', 'children': ['241', '245', '251'], 'value': 'if'}; {'id': '241', 'type': 'call', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '243', 'type': 'argument_list', 'children': ['244']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '245', 'type': 'comparison_operator', 'children': ['246', '250'], 'value': '!='}; {'id': '246', 'type': 'call', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '248', 'type': 'argument_list', 'children': ['249']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '250', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '251', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '252', 'type': 'for_in_clause', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '254', 'type': 'subscript', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'amr_result'}; {'id': '256', 'type': 'slice', 'children': ['257', '258', '259']}; {'id': '257', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '258', 'type': 'colon', 'children': []}; {'id': '259', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '260', 'type': 'keyword_argument', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'mob'}; {'id': '262', 'type': 'call', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'string', 'children': [], 'value': "','"}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '266', 'type': 'generator_expression', 'children': ['267', '279']}; {'id': '267', 'type': 'conditional_expression', 'children': ['268', '272', '278'], 'value': 'if'}; {'id': '268', 'type': 'call', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '270', 'type': 'argument_list', 'children': ['271']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '272', 'type': 'comparison_operator', 'children': ['273', '277'], 'value': '!='}; {'id': '273', 'type': 'call', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '277', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '278', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '279', 'type': 'for_in_clause', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '281', 'type': 'list', 'children': ['282', '283', '286'], 'value': "[contig, results['cluster_id'],\n ';'.join(sorted(inc_dict[str(results['cluster_id'])]))\n ]"}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '283', 'type': 'subscript', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '285', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '286', 'type': 'call', 'children': ['287', '290']}; {'id': '287', 'type': 'attribute', 'children': ['288', '289']}; {'id': '288', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'call', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '293', 'type': 'argument_list', 'children': ['294']}; {'id': '294', 'type': 'subscript', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '296', 'type': 'call', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '298', 'type': 'argument_list', 'children': ['299']}; {'id': '299', 'type': 'subscript', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '301', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '302', 'type': 'except_clause', 'children': ['303', '304']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '304', 'type': 'block', 'children': ['305']}; {'id': '305', 'type': 'pass_statement', 'children': []}; {'id': '306', 'type': 'expression_statement', 'children': ['307']}; {'id': '307', 'type': 'call', 'children': ['308', '311']}; {'id': '308', 'type': 'attribute', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'amr'}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '311', 'type': 'argument_list', 'children': ['312']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'data'}
Create a report combining results from resfinder_assembled and mob_recon_summary reports
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'geneseekrsummary'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Creating predicted plasmid-borne gene summary table'"}; {'id': '13', 'type': 'with_statement', 'children': ['14', '34']}; {'id': '14', 'type': 'with_clause', 'children': ['15']}; {'id': '15', 'type': 'with_item', 'children': ['16']}; {'id': '16', 'type': 'as_pattern', 'children': ['17', '32']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '31']}; {'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', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'reportpath'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'plasmid_borne_summary.csv'"}; {'id': '31', 'type': 'string', 'children': [], 'value': "'w'"}; {'id': '32', 'type': 'as_pattern_target', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'pbs'}; {'id': '34', 'type': 'block', 'children': ['35', '39', '314']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '38', 'type': 'string', 'children': [], 'value': "'Strain,Gene,PercentIdentity,Contig,Location,PlasmidIncompatibilitySets\\n'"}; {'id': '39', 'type': 'for_statement', 'children': ['40', '41', '44']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '44', 'type': 'block', 'children': ['45', '49', '55', '139', '297']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'result_bool'}; {'id': '48', 'type': 'False', 'children': []}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '52', 'type': 'call', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '54', 'type': 'argument_list', 'children': []}; {'id': '55', 'type': 'for_statement', 'children': ['56', '59', '70']}; {'id': '56', 'type': 'pattern_list', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'primarykey'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '59', 'type': 'call', 'children': ['60', '69']}; {'id': '60', 'type': 'attribute', 'children': ['61', '68']}; {'id': '61', 'type': 'attribute', 'children': ['62', '67']}; {'id': '62', 'type': 'subscript', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'report_dict'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '69', 'type': 'argument_list', 'children': []}; {'id': '70', 'type': 'block', 'children': ['71']}; {'id': '71', 'type': 'try_statement', 'children': ['72', '135']}; {'id': '72', 'type': 'block', 'children': ['73', '79', '104']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '76', 'type': 'subscript', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '78', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '82', 'type': 'conditional_expression', 'children': ['83', '95', '103'], 'value': 'if'}; {'id': '83', 'type': 'call', 'children': ['84', '92']}; {'id': '84', 'type': 'attribute', 'children': ['85', '91']}; {'id': '85', 'type': 'call', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'subscript', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '90', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '92', 'type': 'argument_list', 'children': ['93', '94']}; {'id': '93', 'type': 'string', 'children': [], 'value': "','"}; {'id': '94', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '95', 'type': 'comparison_operator', 'children': ['96', '102'], 'value': '!='}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'subscript', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '101', 'type': 'string', 'children': [], 'value': "'rep_type'"}; {'id': '102', 'type': 'string', 'children': [], 'value': "'nan'"}; {'id': '103', 'type': 'string', 'children': [], 'value': "'ND'"}; {'id': '104', 'type': 'try_statement', 'children': ['105', '115']}; {'id': '105', 'type': 'block', 'children': ['106']}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'call', 'children': ['108', '113']}; {'id': '108', 'type': 'attribute', 'children': ['109', '112']}; {'id': '109', 'type': 'subscript', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '113', 'type': 'argument_list', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '115', 'type': 'except_clause', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '117', 'type': 'block', 'children': ['118', '126']}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'assignment', 'children': ['120', '123']}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '123', 'type': 'call', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '125', 'type': 'argument_list', 'children': []}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'call', 'children': ['128', '133']}; {'id': '128', 'type': 'attribute', 'children': ['129', '132']}; {'id': '129', 'type': 'subscript', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '133', 'type': 'argument_list', 'children': ['134']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'rep'}; {'id': '135', 'type': 'except_clause', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '137', 'type': 'block', 'children': ['138']}; {'id': '138', 'type': 'pass_statement', 'children': []}; {'id': '139', 'type': 'for_statement', 'children': ['140', '143', '154']}; {'id': '140', 'type': 'pattern_list', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'primarykey'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '143', 'type': 'call', 'children': ['144', '153']}; {'id': '144', 'type': 'attribute', 'children': ['145', '152']}; {'id': '145', 'type': 'attribute', 'children': ['146', '151']}; {'id': '146', 'type': 'subscript', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'report_dict'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '153', 'type': 'argument_list', 'children': []}; {'id': '154', 'type': 'block', 'children': ['155']}; {'id': '155', 'type': 'try_statement', 'children': ['156', '293']}; {'id': '156', 'type': 'block', 'children': ['157', '170', '196']}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '160', 'type': 'subscript', 'children': ['161', '169']}; {'id': '161', 'type': 'call', 'children': ['162', '167']}; {'id': '162', 'type': 'attribute', 'children': ['163', '166']}; {'id': '163', 'type': 'subscript', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '165', 'type': 'string', 'children': [], 'value': "'contig_id'"}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '167', 'type': 'argument_list', 'children': ['168']}; {'id': '168', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '169', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '170', 'type': 'if_statement', 'children': ['171', '184']}; {'id': '171', 'type': 'call', 'children': ['172', '182']}; {'id': '172', 'type': 'attribute', 'children': ['173', '181']}; {'id': '173', 'type': 'subscript', 'children': ['174', '180']}; {'id': '174', 'type': 'call', 'children': ['175', '178']}; {'id': '175', 'type': 'attribute', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '178', 'type': 'argument_list', 'children': ['179']}; {'id': '179', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '180', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'string', 'children': [], 'value': "'length'"}; {'id': '184', 'type': 'block', 'children': ['185']}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'assignment', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '188', 'type': 'subscript', 'children': ['189', '195']}; {'id': '189', 'type': 'call', 'children': ['190', '193']}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '193', 'type': 'argument_list', 'children': ['194']}; {'id': '194', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '195', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '196', 'type': 'for_statement', 'children': ['197', '200', '209']}; {'id': '197', 'type': 'pattern_list', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'result_dict'}; {'id': '200', 'type': 'call', 'children': ['201', '208']}; {'id': '201', 'type': 'attribute', 'children': ['202', '207']}; {'id': '202', 'type': 'attribute', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'geneseekr_results'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'sampledata'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '208', 'type': 'argument_list', 'children': []}; {'id': '209', 'type': 'block', 'children': ['210']}; {'id': '210', 'type': 'if_statement', 'children': ['211', '216']}; {'id': '211', 'type': 'comparison_operator', 'children': ['212', '213'], 'value': '=='}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '213', 'type': 'subscript', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'result_dict'}; {'id': '215', 'type': 'string', 'children': [], 'value': "'query_id'"}; {'id': '216', 'type': 'block', 'children': ['217', '223']}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'assignment', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'percent_identity'}; {'id': '220', 'type': 'subscript', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'result_dict'}; {'id': '222', 'type': 'string', 'children': [], 'value': "'PercentIdentity'"}; {'id': '223', 'type': 'if_statement', 'children': ['224', '234']}; {'id': '224', 'type': 'comparison_operator', 'children': ['225', '231'], 'value': '>='}; {'id': '225', 'type': 'call', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '227', 'type': 'argument_list', 'children': ['228']}; {'id': '228', 'type': 'subscript', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'result_dict'}; {'id': '230', 'type': 'string', 'children': [], 'value': "'PercentIdentity'"}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'cutoff'}; {'id': '234', 'type': 'block', 'children': ['235', '239', '252']}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'result_bool'}; {'id': '238', 'type': 'True', 'children': []}; {'id': '239', 'type': 'expression_statement', 'children': ['240']}; {'id': '240', 'type': 'augmented_assignment', 'children': ['241', '242'], 'value': '+='}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '242', 'type': 'call', 'children': ['243', '246']}; {'id': '243', 'type': 'attribute', 'children': ['244', '245']}; {'id': '244', 'type': 'string', 'children': [], 'value': "'{sn},'"}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '246', 'type': 'argument_list', 'children': ['247']}; {'id': '247', 'type': 'keyword_argument', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'sn'}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '252', 'type': 'expression_statement', 'children': ['253']}; {'id': '253', 'type': 'augmented_assignment', 'children': ['254', '255'], 'value': '+='}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '255', 'type': 'call', 'children': ['256', '260']}; {'id': '256', 'type': 'attribute', 'children': ['257', '258', '259']}; {'id': '257', 'type': 'string', 'children': [], 'value': "'{gene},{pi},{contig},{cid},{inc}\\n'"}; {'id': '258', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '260', 'type': 'argument_list', 'children': ['261', '264', '267', '270', '275']}; {'id': '261', 'type': 'keyword_argument', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '264', 'type': 'keyword_argument', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'pi'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'percent_identity'}; {'id': '267', 'type': 'keyword_argument', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'contig'}; {'id': '270', 'type': 'keyword_argument', 'children': ['271', '272']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'cid'}; {'id': '272', 'type': 'subscript', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '274', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '275', 'type': 'keyword_argument', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'inc'}; {'id': '277', 'type': 'call', 'children': ['278', '281']}; {'id': '278', 'type': 'attribute', 'children': ['279', '280']}; {'id': '279', 'type': 'string', 'children': [], 'value': "';'"}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '281', 'type': 'argument_list', 'children': ['282']}; {'id': '282', 'type': 'call', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '284', 'type': 'argument_list', 'children': ['285']}; {'id': '285', 'type': 'subscript', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'inc_dict'}; {'id': '287', 'type': 'call', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '289', 'type': 'argument_list', 'children': ['290']}; {'id': '290', 'type': 'subscript', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '292', 'type': 'string', 'children': [], 'value': "'cluster_id'"}; {'id': '293', 'type': 'except_clause', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '295', 'type': 'block', 'children': ['296']}; {'id': '296', 'type': 'pass_statement', 'children': []}; {'id': '297', 'type': 'if_statement', 'children': ['298', '300']}; {'id': '298', 'type': 'not_operator', 'children': ['299']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'result_bool'}; {'id': '300', 'type': 'block', 'children': ['301']}; {'id': '301', 'type': 'expression_statement', 'children': ['302']}; {'id': '302', 'type': 'augmented_assignment', 'children': ['303', '304'], 'value': '+='}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '304', 'type': 'call', 'children': ['305', '308']}; {'id': '305', 'type': 'attribute', 'children': ['306', '307']}; {'id': '306', 'type': 'string', 'children': [], 'value': "'{sn}\\n'"}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '308', 'type': 'argument_list', 'children': ['309']}; {'id': '309', 'type': 'keyword_argument', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'sn'}; {'id': '311', 'type': 'attribute', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '314', 'type': 'expression_statement', 'children': ['315']}; {'id': '315', 'type': 'call', 'children': ['316', '319']}; {'id': '316', 'type': 'attribute', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'pbs'}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '319', 'type': 'argument_list', 'children': ['320']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'data'}
Create a report combining GeneSeekr and MOB Recon outputs
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'makedbthreads'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '38', '77', '164']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '8', '11']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'metadata'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'if_statement', 'children': ['13', '22']}; {'id': '13', 'type': 'comparison_operator', 'children': ['14', '21'], 'value': '!='}; {'id': '14', 'type': 'attribute', 'children': ['15', '20']}; {'id': '15', 'type': 'subscript', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'combinedtargets'}; {'id': '21', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '22', 'type': 'block', 'children': ['23']}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'call', 'children': ['25', '30']}; {'id': '25', 'type': 'attribute', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'targetfolders'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'attribute', 'children': ['32', '37']}; {'id': '32', 'type': 'subscript', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'targetpath'}; {'id': '38', 'type': 'for_statement', 'children': ['39', '40', '49']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '40', 'type': 'call', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '42', 'type': 'argument_list', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'len'}; {'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': 'targetfolders'}; {'id': '49', 'type': 'block', 'children': ['50', '64', '71']}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '53', 'type': 'call', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'Thread'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '61']}; {'id': '56', 'type': 'keyword_argument', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'makeblastdb'}; {'id': '61', 'type': 'keyword_argument', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '63', 'type': 'tuple', 'children': []}; {'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': 'threads'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'setDaemon'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'True', 'children': []}; {'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': 'threads'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '76', 'type': 'argument_list', 'children': []}; {'id': '77', 'type': 'for_statement', 'children': ['78', '79', '82']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'targetdir'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'targetfolders'}; {'id': '82', 'type': 'block', 'children': ['83', '100', '130']}; {'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': 'targetfiles'}; {'id': '88', 'type': 'call', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '97']}; {'id': '92', 'type': 'attribute', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '97', 'type': 'argument_list', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'targetdir'}; {'id': '99', 'type': 'string', 'children': [], 'value': "'*.fasta'"}; {'id': '100', 'type': 'try_statement', 'children': ['101', '110']}; {'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': '_'}; {'id': '105', 'type': 'subscript', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'targetfiles'}; {'id': '109', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '110', 'type': 'except_clause', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '112', 'type': 'block', 'children': ['113']}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'targetfiles'}; {'id': '118', 'type': 'call', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'glob'}; {'id': '120', 'type': 'argument_list', 'children': ['121']}; {'id': '121', 'type': 'call', 'children': ['122', '127']}; {'id': '122', 'type': 'attribute', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '127', 'type': 'argument_list', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'targetdir'}; {'id': '129', 'type': 'string', 'children': [], 'value': "'*.fasta'"}; {'id': '130', 'type': 'for_statement', 'children': ['131', '132', '135']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'targetfile'}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'targetfiles'}; {'id': '135', 'type': 'block', 'children': ['136', '155']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '143']}; {'id': '138', 'type': 'subscript', 'children': ['139', '142']}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'records'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'targetfile'}; {'id': '143', 'type': 'call', 'children': ['144', '147']}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'SeqIO'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'to_dict'}; {'id': '147', 'type': 'argument_list', 'children': ['148']}; {'id': '148', 'type': 'call', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'SeqIO'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'parse'}; {'id': '152', 'type': 'argument_list', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'targetfile'}; {'id': '154', 'type': 'string', 'children': [], 'value': "'fasta'"}; {'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': 'dqueue'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'put'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'targetfile'}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'call', 'children': ['166', '171']}; {'id': '166', 'type': 'attribute', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'dqueue'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '171', 'type': 'argument_list', 'children': []}
Setup and create threads for class
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'cowbat'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13', '49', '85', '116', '152', '188', '229', '265', '307', '349', '391', '433', '469']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Beginning COWBAT database downloads'"}; {'id': '13', 'type': 'if_statement', 'children': ['14', '37']}; {'id': '14', 'type': 'boolean_operator', 'children': ['15', '18'], 'value': 'or'}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '18', 'type': 'not_operator', 'children': ['19']}; {'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': 'os'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'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': 'os'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'join'}; {'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': 'databasepath'}; {'id': '36', 'type': 'string', 'children': [], 'value': "'genesippr'"}; {'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': 'self'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'sipprverse_targets'}; {'id': '43', 'type': 'argument_list', 'children': ['44']}; {'id': '44', 'type': 'keyword_argument', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '49', 'type': 'if_statement', 'children': ['50', '73']}; {'id': '50', 'type': 'boolean_operator', 'children': ['51', '54'], 'value': 'or'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '54', 'type': 'not_operator', 'children': ['55']}; {'id': '55', 'type': 'call', 'children': ['56', '61']}; {'id': '56', 'type': 'attribute', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'call', 'children': ['63', '68']}; {'id': '63', 'type': 'attribute', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '72', 'type': 'string', 'children': [], 'value': "'coregenome'"}; {'id': '73', 'type': 'block', 'children': ['74']}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'cowbat_targets'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'keyword_argument', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '85', 'type': 'if_statement', 'children': ['86', '109']}; {'id': '86', 'type': 'boolean_operator', 'children': ['87', '90'], 'value': 'or'}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '90', 'type': 'not_operator', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '97']}; {'id': '92', 'type': 'attribute', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '97', 'type': 'argument_list', 'children': ['98']}; {'id': '98', 'type': 'call', 'children': ['99', '104']}; {'id': '99', 'type': 'attribute', 'children': ['100', '103']}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '104', 'type': 'argument_list', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '108', 'type': 'string', 'children': [], 'value': "'ConFindr'"}; {'id': '109', 'type': 'block', 'children': ['110']}; {'id': '110', 'type': 'expression_statement', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'confindr_targets'}; {'id': '115', 'type': 'argument_list', 'children': []}; {'id': '116', 'type': 'if_statement', 'children': ['117', '140']}; {'id': '117', 'type': 'boolean_operator', 'children': ['118', '121'], 'value': 'or'}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '121', 'type': 'not_operator', 'children': ['122']}; {'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': 'os'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'call', 'children': ['130', '135']}; {'id': '130', 'type': 'attribute', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'join'}; {'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': 'databasepath'}; {'id': '139', 'type': 'string', 'children': [], 'value': "'mash'"}; {'id': '140', 'type': 'block', 'children': ['141']}; {'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': 'self'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'mash'}; {'id': '146', 'type': 'argument_list', 'children': ['147']}; {'id': '147', 'type': 'keyword_argument', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '152', 'type': 'if_statement', 'children': ['153', '176']}; {'id': '153', 'type': 'boolean_operator', 'children': ['154', '157'], 'value': 'or'}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '157', 'type': 'not_operator', 'children': ['158']}; {'id': '158', 'type': 'call', 'children': ['159', '164']}; {'id': '159', 'type': 'attribute', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'call', 'children': ['166', '171']}; {'id': '166', 'type': 'attribute', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '171', 'type': 'argument_list', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'MLST'"}; {'id': '176', 'type': 'block', 'children': ['177']}; {'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': 'self'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'mlst'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'keyword_argument', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '188', 'type': 'if_statement', 'children': ['189', '212']}; {'id': '189', 'type': 'boolean_operator', 'children': ['190', '193'], 'value': 'or'}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '193', 'type': 'not_operator', 'children': ['194']}; {'id': '194', 'type': 'call', 'children': ['195', '200']}; {'id': '195', 'type': 'attribute', 'children': ['196', '199']}; {'id': '196', 'type': 'attribute', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '200', 'type': 'argument_list', 'children': ['201']}; {'id': '201', 'type': 'call', 'children': ['202', '207']}; {'id': '202', 'type': 'attribute', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '207', 'type': 'argument_list', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '211', 'type': 'string', 'children': [], 'value': "'rMLST'"}; {'id': '212', 'type': 'block', 'children': ['213']}; {'id': '213', 'type': 'expression_statement', 'children': ['214']}; {'id': '214', 'type': 'call', 'children': ['215', '218']}; {'id': '215', 'type': 'attribute', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'rmlst'}; {'id': '218', 'type': 'argument_list', 'children': ['219', '224']}; {'id': '219', 'type': 'keyword_argument', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '224', 'type': 'keyword_argument', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'credentials'}; {'id': '226', 'type': 'attribute', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'credentials'}; {'id': '229', 'type': 'if_statement', 'children': ['230', '253']}; {'id': '230', 'type': 'boolean_operator', 'children': ['231', '234'], 'value': 'or'}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '234', 'type': 'not_operator', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '241']}; {'id': '236', 'type': 'attribute', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '241', 'type': 'argument_list', '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': 'os'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '252']}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '252', 'type': 'string', 'children': [], 'value': "'univec'"}; {'id': '253', 'type': 'block', 'children': ['254']}; {'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': 'self'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'univec'}; {'id': '259', 'type': 'argument_list', 'children': ['260']}; {'id': '260', 'type': 'keyword_argument', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '262', 'type': 'attribute', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '265', 'type': 'if_statement', 'children': ['266', '289']}; {'id': '266', 'type': 'boolean_operator', 'children': ['267', '270'], 'value': 'or'}; {'id': '267', 'type': 'attribute', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '270', 'type': 'not_operator', 'children': ['271']}; {'id': '271', 'type': 'call', 'children': ['272', '277']}; {'id': '272', 'type': 'attribute', 'children': ['273', '276']}; {'id': '273', 'type': 'attribute', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '277', 'type': 'argument_list', 'children': ['278']}; {'id': '278', 'type': 'call', 'children': ['279', '284']}; {'id': '279', 'type': 'attribute', 'children': ['280', '283']}; {'id': '280', 'type': 'attribute', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '284', 'type': 'argument_list', 'children': ['285', '288']}; {'id': '285', 'type': 'attribute', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '288', 'type': 'string', 'children': [], 'value': "'resfinder'"}; {'id': '289', 'type': 'block', 'children': ['290']}; {'id': '290', 'type': 'expression_statement', 'children': ['291']}; {'id': '291', 'type': 'call', 'children': ['292', '295']}; {'id': '292', 'type': 'attribute', 'children': ['293', '294']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'cge_db_downloader'}; {'id': '295', 'type': 'argument_list', 'children': ['296', '301', '304']}; {'id': '296', 'type': 'keyword_argument', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '298', 'type': 'attribute', 'children': ['299', '300']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '301', 'type': 'keyword_argument', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '303', 'type': 'string', 'children': [], 'value': "'resfinder'"}; {'id': '304', 'type': 'keyword_argument', 'children': ['305', '306']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'dbname'}; {'id': '306', 'type': 'string', 'children': [], 'value': "'resfinder_db'"}; {'id': '307', 'type': 'if_statement', 'children': ['308', '331']}; {'id': '308', 'type': 'boolean_operator', 'children': ['309', '312'], 'value': 'or'}; {'id': '309', 'type': 'attribute', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '312', 'type': 'not_operator', 'children': ['313']}; {'id': '313', 'type': 'call', 'children': ['314', '319']}; {'id': '314', 'type': 'attribute', 'children': ['315', '318']}; {'id': '315', 'type': 'attribute', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '319', 'type': 'argument_list', 'children': ['320']}; {'id': '320', 'type': 'call', 'children': ['321', '326']}; {'id': '321', 'type': 'attribute', 'children': ['322', '325']}; {'id': '322', 'type': 'attribute', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '326', 'type': 'argument_list', 'children': ['327', '330']}; {'id': '327', 'type': 'attribute', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '330', 'type': 'string', 'children': [], 'value': "'virulence'"}; {'id': '331', 'type': 'block', 'children': ['332']}; {'id': '332', 'type': 'expression_statement', 'children': ['333']}; {'id': '333', 'type': 'call', 'children': ['334', '337']}; {'id': '334', 'type': 'attribute', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'cge_db_downloader'}; {'id': '337', 'type': 'argument_list', 'children': ['338', '343', '346']}; {'id': '338', 'type': 'keyword_argument', 'children': ['339', '340']}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '340', 'type': 'attribute', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '343', 'type': 'keyword_argument', 'children': ['344', '345']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '345', 'type': 'string', 'children': [], 'value': "'virulence'"}; {'id': '346', 'type': 'keyword_argument', 'children': ['347', '348']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'dbname'}; {'id': '348', 'type': 'string', 'children': [], 'value': "'virulencefinder_db'"}; {'id': '349', 'type': 'if_statement', 'children': ['350', '373']}; {'id': '350', 'type': 'boolean_operator', 'children': ['351', '354'], 'value': 'or'}; {'id': '351', 'type': 'attribute', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '354', 'type': 'not_operator', 'children': ['355']}; {'id': '355', 'type': 'call', 'children': ['356', '361']}; {'id': '356', 'type': 'attribute', 'children': ['357', '360']}; {'id': '357', 'type': 'attribute', 'children': ['358', '359']}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '361', 'type': 'argument_list', 'children': ['362']}; {'id': '362', 'type': 'call', 'children': ['363', '368']}; {'id': '363', 'type': 'attribute', 'children': ['364', '367']}; {'id': '364', 'type': 'attribute', 'children': ['365', '366']}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '368', 'type': 'argument_list', 'children': ['369', '372']}; {'id': '369', 'type': 'attribute', 'children': ['370', '371']}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '372', 'type': 'string', 'children': [], 'value': "'serosippr'"}; {'id': '373', 'type': 'block', 'children': ['374']}; {'id': '374', 'type': 'expression_statement', 'children': ['375']}; {'id': '375', 'type': 'call', 'children': ['376', '379']}; {'id': '376', 'type': 'attribute', 'children': ['377', '378']}; {'id': '377', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'cge_db_downloader'}; {'id': '379', 'type': 'argument_list', 'children': ['380', '385', '388']}; {'id': '380', 'type': 'keyword_argument', 'children': ['381', '382']}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '382', 'type': 'attribute', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '385', 'type': 'keyword_argument', 'children': ['386', '387']}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '387', 'type': 'string', 'children': [], 'value': "'serosippr'"}; {'id': '388', 'type': 'keyword_argument', 'children': ['389', '390']}; {'id': '389', 'type': 'identifier', 'children': [], 'value': 'dbname'}; {'id': '390', 'type': 'string', 'children': [], 'value': "'serotypefinder_db'"}; {'id': '391', 'type': 'if_statement', 'children': ['392', '415']}; {'id': '392', 'type': 'boolean_operator', 'children': ['393', '396'], 'value': 'or'}; {'id': '393', 'type': 'attribute', 'children': ['394', '395']}; {'id': '394', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '395', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '396', 'type': 'not_operator', 'children': ['397']}; {'id': '397', 'type': 'call', 'children': ['398', '403']}; {'id': '398', 'type': 'attribute', 'children': ['399', '402']}; {'id': '399', 'type': 'attribute', 'children': ['400', '401']}; {'id': '400', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '401', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '402', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '403', 'type': 'argument_list', 'children': ['404']}; {'id': '404', 'type': 'call', 'children': ['405', '410']}; {'id': '405', 'type': 'attribute', 'children': ['406', '409']}; {'id': '406', 'type': 'attribute', 'children': ['407', '408']}; {'id': '407', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '408', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '409', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '410', 'type': 'argument_list', 'children': ['411', '414']}; {'id': '411', 'type': 'attribute', 'children': ['412', '413']}; {'id': '412', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '413', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '414', 'type': 'string', 'children': [], 'value': "'pointfinder'"}; {'id': '415', 'type': 'block', 'children': ['416']}; {'id': '416', 'type': 'expression_statement', 'children': ['417']}; {'id': '417', 'type': 'call', 'children': ['418', '421']}; {'id': '418', 'type': 'attribute', 'children': ['419', '420']}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '420', 'type': 'identifier', 'children': [], 'value': 'cge_db_downloader'}; {'id': '421', 'type': 'argument_list', 'children': ['422', '427', '430']}; {'id': '422', 'type': 'keyword_argument', 'children': ['423', '424']}; {'id': '423', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '424', 'type': 'attribute', 'children': ['425', '426']}; {'id': '425', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '426', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '427', 'type': 'keyword_argument', 'children': ['428', '429']}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'analysistype'}; {'id': '429', 'type': 'string', 'children': [], 'value': "'pointfinder'"}; {'id': '430', 'type': 'keyword_argument', 'children': ['431', '432']}; {'id': '431', 'type': 'identifier', 'children': [], 'value': 'dbname'}; {'id': '432', 'type': 'string', 'children': [], 'value': "'pointfinder_db'"}; {'id': '433', 'type': 'if_statement', 'children': ['434', '457']}; {'id': '434', 'type': 'boolean_operator', 'children': ['435', '438'], 'value': 'or'}; {'id': '435', 'type': 'attribute', 'children': ['436', '437']}; {'id': '436', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '437', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '438', 'type': 'not_operator', 'children': ['439']}; {'id': '439', 'type': 'call', 'children': ['440', '445']}; {'id': '440', 'type': 'attribute', 'children': ['441', '444']}; {'id': '441', 'type': 'attribute', 'children': ['442', '443']}; {'id': '442', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '443', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '444', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '445', 'type': 'argument_list', 'children': ['446']}; {'id': '446', 'type': 'call', 'children': ['447', '452']}; {'id': '447', 'type': 'attribute', 'children': ['448', '451']}; {'id': '448', 'type': 'attribute', 'children': ['449', '450']}; {'id': '449', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '450', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '451', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '452', 'type': 'argument_list', 'children': ['453', '456']}; {'id': '453', 'type': 'attribute', 'children': ['454', '455']}; {'id': '454', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '455', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '456', 'type': 'string', 'children': [], 'value': "'clark'"}; {'id': '457', 'type': 'block', 'children': ['458']}; {'id': '458', 'type': 'expression_statement', 'children': ['459']}; {'id': '459', 'type': 'call', 'children': ['460', '463']}; {'id': '460', 'type': 'attribute', 'children': ['461', '462']}; {'id': '461', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '462', 'type': 'identifier', 'children': [], 'value': 'clark'}; {'id': '463', 'type': 'argument_list', 'children': ['464']}; {'id': '464', 'type': 'keyword_argument', 'children': ['465', '466']}; {'id': '465', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '466', 'type': 'attribute', 'children': ['467', '468']}; {'id': '467', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '468', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '469', 'type': 'if_statement', 'children': ['470', '493']}; {'id': '470', 'type': 'boolean_operator', 'children': ['471', '474'], 'value': 'or'}; {'id': '471', 'type': 'attribute', 'children': ['472', '473']}; {'id': '472', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '473', 'type': 'identifier', 'children': [], 'value': 'overwrite'}; {'id': '474', 'type': 'not_operator', 'children': ['475']}; {'id': '475', 'type': 'call', 'children': ['476', '481']}; {'id': '476', 'type': 'attribute', 'children': ['477', '480']}; {'id': '477', 'type': 'attribute', 'children': ['478', '479']}; {'id': '478', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '479', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '480', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '481', 'type': 'argument_list', 'children': ['482']}; {'id': '482', 'type': 'call', 'children': ['483', '488']}; {'id': '483', 'type': 'attribute', 'children': ['484', '487']}; {'id': '484', 'type': 'attribute', 'children': ['485', '486']}; {'id': '485', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '486', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '487', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '488', 'type': 'argument_list', 'children': ['489', '492']}; {'id': '489', 'type': 'attribute', 'children': ['490', '491']}; {'id': '490', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '491', 'type': 'identifier', 'children': [], 'value': 'databasepath'}; {'id': '492', 'type': 'string', 'children': [], 'value': "'mob_suite'"}; {'id': '493', 'type': 'block', 'children': ['494']}; {'id': '494', 'type': 'expression_statement', 'children': ['495']}; {'id': '495', 'type': 'call', 'children': ['496', '499']}; {'id': '496', 'type': 'attribute', 'children': ['497', '498']}; {'id': '497', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '498', 'type': 'identifier', 'children': [], 'value': 'mob_suite_targets'}; {'id': '499', 'type': 'argument_list', 'children': []}
Run all the methods
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'bowtie'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '42', '460']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '8', '14']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '10', 'type': 'argument_list', 'children': ['11']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'cpus'}; {'id': '14', 'type': 'block', 'children': ['15', '29', '36']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'Thread'}; {'id': '20', 'type': 'argument_list', 'children': ['21', '26']}; {'id': '21', 'type': 'keyword_argument', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'align'}; {'id': '26', 'type': 'keyword_argument', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '28', 'type': 'tuple', 'children': []}; {'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': 'threads'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'setDaemon'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'True', 'children': []}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '41', 'type': 'argument_list', 'children': []}; {'id': '42', 'type': 'with_statement', 'children': ['43', '54']}; {'id': '43', 'type': 'with_clause', 'children': ['44']}; {'id': '44', 'type': 'with_item', 'children': ['45']}; {'id': '45', 'type': 'as_pattern', 'children': ['46', '52']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'progressbar'}; {'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': 'metadata'}; {'id': '52', 'type': 'as_pattern_target', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'bar'}; {'id': '54', 'type': 'block', 'children': ['55']}; {'id': '55', 'type': 'for_statement', 'children': ['56', '57', '58']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'bar'}; {'id': '58', 'type': 'block', 'children': ['59', '67', '73']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'mapping'}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'GenObject'}; {'id': '66', 'type': 'argument_list', 'children': []}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'assignment', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '73', 'type': 'if_statement', 'children': ['74', '79', '434']}; {'id': '74', 'type': 'comparison_operator', 'children': ['75', '78'], 'value': '!='}; {'id': '75', 'type': 'attribute', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '78', 'type': 'string', 'children': [], 'value': '"NA"'}; {'id': '79', 'type': 'block', 'children': ['80', '96', '103', '126', '141', '147', '165', '181', '193', '212', '229', '248', '371', '392', '403', '414']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'QualimapResults'}; {'id': '85', 'type': 'call', 'children': ['86', '91']}; {'id': '86', 'type': 'attribute', 'children': ['87', '90']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '91', 'type': 'argument_list', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'outputdirectory'}; {'id': '95', 'type': 'string', 'children': [], 'value': "'qualimap_results'"}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'make_path'}; {'id': '99', 'type': 'argument_list', 'children': ['100']}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'QualimapResults'}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'sortedbam'}; {'id': '108', 'type': 'call', 'children': ['109', '114']}; {'id': '109', 'type': 'attribute', 'children': ['110', '113']}; {'id': '110', 'type': 'attribute', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '114', 'type': 'argument_list', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'QualimapResults'}; {'id': '118', 'type': 'call', 'children': ['119', '122']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'string', 'children': [], 'value': "'{}_sorted.bam'"}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'assignment', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'filenoext'}; {'id': '129', 'type': 'subscript', 'children': ['130', '140']}; {'id': '130', 'type': 'call', 'children': ['131', '136']}; {'id': '131', 'type': 'attribute', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'splitext'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'filteredfile'}; {'id': '140', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'filenoext'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'filenoext'}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'assignment', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'bowtie2results'}; {'id': '152', 'type': 'call', 'children': ['153', '158']}; {'id': '153', 'type': 'attribute', 'children': ['154', '157']}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '158', 'type': 'argument_list', 'children': ['159', '162']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'QualimapResults'}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '165', 'type': 'expression_statement', 'children': ['166']}; {'id': '166', 'type': 'assignment', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'bowtie2build'}; {'id': '168', 'type': 'call', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'Bowtie2BuildCommandLine'}; {'id': '170', 'type': 'argument_list', 'children': ['171', '176']}; {'id': '171', 'type': 'keyword_argument', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'reference'}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'bestassemblyfile'}; {'id': '176', 'type': 'keyword_argument', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'bt2'}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'bowtie2results'}; {'id': '181', 'type': 'expression_statement', 'children': ['182']}; {'id': '182', 'type': 'assignment', 'children': ['183', '188']}; {'id': '183', 'type': 'attribute', 'children': ['184', '187']}; {'id': '184', 'type': 'attribute', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'mapping'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'BamFile'}; {'id': '188', 'type': 'binary_operator', 'children': ['189', '192'], 'value': '+'}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'bowtie2results'}; {'id': '192', 'type': 'string', 'children': [], 'value': '"_sorted.bam"'}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'samsort'}; {'id': '196', 'type': 'call', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'SamtoolsSortCommandline'}; {'id': '198', 'type': 'argument_list', 'children': ['199', '206', '209']}; {'id': '199', 'type': 'keyword_argument', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'input'}; {'id': '201', 'type': 'attribute', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'mapping'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'BamFile'}; {'id': '206', 'type': 'keyword_argument', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '208', 'type': 'True', 'children': []}; {'id': '209', 'type': 'keyword_argument', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'out_prefix'}; {'id': '211', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'samtools'}; {'id': '215', 'type': 'list', 'children': ['216', '228'], 'value': '[SamtoolsViewCommandline(b=True, S=True, input_file="-"), samsort]'}; {'id': '216', 'type': 'call', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'SamtoolsViewCommandline'}; {'id': '218', 'type': 'argument_list', 'children': ['219', '222', '225']}; {'id': '219', 'type': 'keyword_argument', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '221', 'type': 'True', 'children': []}; {'id': '222', 'type': 'keyword_argument', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'S'}; {'id': '224', 'type': 'True', 'children': []}; {'id': '225', 'type': 'keyword_argument', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'input_file'}; {'id': '227', 'type': 'string', 'children': [], 'value': '"-"'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'samsort'}; {'id': '229', 'type': 'expression_statement', 'children': ['230']}; {'id': '230', 'type': 'assignment', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '232', 'type': 'dictionary', 'children': ['233', '236', '239', '242', '245']}; {'id': '233', 'type': 'pair', 'children': ['234', '235']}; {'id': '234', 'type': 'string', 'children': [], 'value': "'D'"}; {'id': '235', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '236', 'type': 'pair', 'children': ['237', '238']}; {'id': '237', 'type': 'string', 'children': [], 'value': "'R'"}; {'id': '238', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '239', 'type': 'pair', 'children': ['240', '241']}; {'id': '240', 'type': 'string', 'children': [], 'value': "'num_mismatches'"}; {'id': '241', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '242', 'type': 'pair', 'children': ['243', '244']}; {'id': '243', 'type': 'string', 'children': [], 'value': "'seed_length'"}; {'id': '244', 'type': 'integer', 'children': [], 'value': '22'}; {'id': '245', 'type': 'pair', 'children': ['246', '247']}; {'id': '246', 'type': 'string', 'children': [], 'value': "'i_func'"}; {'id': '247', 'type': 'string', 'children': [], 'value': '"S,0,2.50"'}; {'id': '248', 'type': 'try_statement', 'children': ['249', '313']}; {'id': '249', 'type': 'block', 'children': ['250', '258']}; {'id': '250', 'type': 'expression_statement', 'children': ['251']}; {'id': '251', 'type': 'assignment', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '253', 'type': 'attribute', 'children': ['254', '257']}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'mergedreads'}; {'id': '258', 'type': 'if_statement', 'children': ['259', '269', '295']}; {'id': '259', 'type': 'comparison_operator', 'children': ['260', '268'], 'value': '=='}; {'id': '260', 'type': 'call', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '262', 'type': 'argument_list', 'children': ['263']}; {'id': '263', 'type': 'attribute', 'children': ['264', '267']}; {'id': '264', 'type': 'attribute', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'trimmedcorrectedfastqfiles'}; {'id': '268', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '269', 'type': 'block', 'children': ['270']}; {'id': '270', 'type': 'expression_statement', 'children': ['271']}; {'id': '271', 'type': 'call', 'children': ['272', '275']}; {'id': '272', 'type': 'attribute', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'dictionary', 'children': ['277', '286']}; {'id': '277', 'type': 'pair', 'children': ['278', '279']}; {'id': '278', 'type': 'string', 'children': [], 'value': "'m1'"}; {'id': '279', 'type': 'subscript', 'children': ['280', '285']}; {'id': '280', 'type': 'attribute', 'children': ['281', '284']}; {'id': '281', 'type': 'attribute', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'trimmedcorrectedfastqfiles'}; {'id': '285', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '286', 'type': 'pair', 'children': ['287', '288']}; {'id': '287', 'type': 'string', 'children': [], 'value': "'m2'"}; {'id': '288', 'type': 'subscript', 'children': ['289', '294']}; {'id': '289', 'type': 'attribute', 'children': ['290', '293']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'trimmedcorrectedfastqfiles'}; {'id': '294', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '295', 'type': 'else_clause', 'children': ['296']}; {'id': '296', 'type': 'block', 'children': ['297']}; {'id': '297', 'type': 'expression_statement', 'children': ['298']}; {'id': '298', 'type': 'call', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '302', 'type': 'argument_list', 'children': ['303']}; {'id': '303', 'type': 'dictionary', 'children': ['304']}; {'id': '304', 'type': 'pair', 'children': ['305', '306']}; {'id': '305', 'type': 'string', 'children': [], 'value': "'U'"}; {'id': '306', 'type': 'subscript', 'children': ['307', '312']}; {'id': '307', 'type': 'attribute', 'children': ['308', '311']}; {'id': '308', 'type': 'attribute', 'children': ['309', '310']}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'trimmedcorrectedfastqfiles'}; {'id': '312', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '313', 'type': 'except_clause', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'AttributeError'}; {'id': '315', 'type': 'block', 'children': ['316']}; {'id': '316', 'type': 'if_statement', 'children': ['317', '327', '353']}; {'id': '317', 'type': 'comparison_operator', 'children': ['318', '326'], 'value': '=='}; {'id': '318', 'type': 'call', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '320', 'type': 'argument_list', 'children': ['321']}; {'id': '321', 'type': 'attribute', 'children': ['322', '325']}; {'id': '322', 'type': 'attribute', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'assemblyfastq'}; {'id': '326', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '327', 'type': 'block', 'children': ['328']}; {'id': '328', 'type': 'expression_statement', 'children': ['329']}; {'id': '329', 'type': 'call', 'children': ['330', '333']}; {'id': '330', 'type': 'attribute', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '333', 'type': 'argument_list', 'children': ['334']}; {'id': '334', 'type': 'dictionary', 'children': ['335', '344']}; {'id': '335', 'type': 'pair', 'children': ['336', '337']}; {'id': '336', 'type': 'string', 'children': [], 'value': "'m1'"}; {'id': '337', 'type': 'subscript', 'children': ['338', '343']}; {'id': '338', 'type': 'attribute', 'children': ['339', '342']}; {'id': '339', 'type': 'attribute', 'children': ['340', '341']}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'assemblyfastq'}; {'id': '343', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '344', 'type': 'pair', 'children': ['345', '346']}; {'id': '345', 'type': 'string', 'children': [], 'value': "'m2'"}; {'id': '346', 'type': 'subscript', 'children': ['347', '352']}; {'id': '347', 'type': 'attribute', 'children': ['348', '351']}; {'id': '348', 'type': 'attribute', 'children': ['349', '350']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '351', 'type': 'identifier', 'children': [], 'value': 'assemblyfastq'}; {'id': '352', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '353', 'type': 'else_clause', 'children': ['354']}; {'id': '354', 'type': 'block', 'children': ['355']}; {'id': '355', 'type': 'expression_statement', 'children': ['356']}; {'id': '356', 'type': 'call', 'children': ['357', '360']}; {'id': '357', 'type': 'attribute', 'children': ['358', '359']}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '360', 'type': 'argument_list', 'children': ['361']}; {'id': '361', 'type': 'dictionary', 'children': ['362']}; {'id': '362', 'type': 'pair', 'children': ['363', '364']}; {'id': '363', 'type': 'string', 'children': [], 'value': "'U'"}; {'id': '364', 'type': 'subscript', 'children': ['365', '370']}; {'id': '365', 'type': 'attribute', 'children': ['366', '369']}; {'id': '366', 'type': 'attribute', 'children': ['367', '368']}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '368', 'type': 'identifier', 'children': [], 'value': 'general'}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'assemblyfastq'}; {'id': '370', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '371', 'type': 'expression_statement', 'children': ['372']}; {'id': '372', 'type': 'assignment', 'children': ['373', '374']}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'bowtie2align'}; {'id': '374', 'type': 'call', 'children': ['375', '376']}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'Bowtie2CommandLine'}; {'id': '376', 'type': 'argument_list', 'children': ['377', '382', '387', '390']}; {'id': '377', 'type': 'keyword_argument', 'children': ['378', '379']}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'bt2'}; {'id': '379', 'type': 'attribute', 'children': ['380', '381']}; {'id': '380', 'type': 'identifier', 'children': [], 'value': 'sagen'}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'bowtie2results'}; {'id': '382', 'type': 'keyword_argument', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '384', 'type': 'attribute', 'children': ['385', '386']}; {'id': '385', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'threads'}; {'id': '387', 'type': 'keyword_argument', 'children': ['388', '389']}; {'id': '388', 'type': 'identifier', 'children': [], 'value': 'samtools'}; {'id': '389', 'type': 'identifier', 'children': [], 'value': 'samtools'}; {'id': '390', 'type': 'dictionary_splat', 'children': ['391']}; {'id': '391', 'type': 'identifier', 'children': [], 'value': 'indict'}; {'id': '392', 'type': 'expression_statement', 'children': ['393']}; {'id': '393', 'type': 'assignment', 'children': ['394', '399']}; {'id': '394', 'type': 'attribute', 'children': ['395', '398']}; {'id': '395', 'type': 'attribute', 'children': ['396', '397']}; {'id': '396', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '397', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '398', 'type': 'identifier', 'children': [], 'value': 'bowtie2align'}; {'id': '399', 'type': 'call', 'children': ['400', '401']}; {'id': '400', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '401', 'type': 'argument_list', 'children': ['402']}; {'id': '402', 'type': 'identifier', 'children': [], 'value': 'bowtie2align'}; {'id': '403', 'type': 'expression_statement', 'children': ['404']}; {'id': '404', 'type': 'assignment', 'children': ['405', '410']}; {'id': '405', 'type': 'attribute', 'children': ['406', '409']}; {'id': '406', 'type': 'attribute', 'children': ['407', '408']}; {'id': '407', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '408', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '409', 'type': 'identifier', 'children': [], 'value': 'bowtie2build'}; {'id': '410', 'type': 'call', 'children': ['411', '412']}; {'id': '411', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '412', 'type': 'argument_list', 'children': ['413']}; {'id': '413', 'type': 'identifier', 'children': [], 'value': 'bowtie2build'}; {'id': '414', 'type': 'expression_statement', 'children': ['415']}; {'id': '415', 'type': 'call', 'children': ['416', '421']}; {'id': '416', 'type': 'attribute', 'children': ['417', '420']}; {'id': '417', 'type': 'attribute', 'children': ['418', '419']}; {'id': '418', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'bowqueue'}; {'id': '420', 'type': 'identifier', 'children': [], 'value': 'put'}; {'id': '421', 'type': 'argument_list', 'children': ['422']}; {'id': '422', 'type': 'tuple', 'children': ['423', '424', '429']}; {'id': '423', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '424', 'type': 'attribute', 'children': ['425', '428']}; {'id': '425', 'type': 'attribute', 'children': ['426', '427']}; {'id': '426', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '427', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'bowtie2build'}; {'id': '429', 'type': 'attribute', 'children': ['430', '433']}; {'id': '430', 'type': 'attribute', 'children': ['431', '432']}; {'id': '431', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '432', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '433', 'type': 'identifier', 'children': [], 'value': 'bowtie2align'}; {'id': '434', 'type': 'else_clause', 'children': ['435']}; {'id': '435', 'type': 'block', 'children': ['436', '444', '452']}; {'id': '436', 'type': 'expression_statement', 'children': ['437']}; {'id': '437', 'type': 'assignment', 'children': ['438', '443']}; {'id': '438', 'type': 'attribute', 'children': ['439', '442']}; {'id': '439', 'type': 'attribute', 'children': ['440', '441']}; {'id': '440', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '441', 'type': 'identifier', 'children': [], 'value': 'commands'}; {'id': '442', 'type': 'identifier', 'children': [], 'value': 'samtools'}; {'id': '443', 'type': 'string', 'children': [], 'value': '"NA"'}; {'id': '444', 'type': 'expression_statement', 'children': ['445']}; {'id': '445', 'type': 'assignment', 'children': ['446', '451']}; {'id': '446', 'type': 'attribute', 'children': ['447', '450']}; {'id': '447', 'type': 'attribute', 'children': ['448', '449']}; {'id': '448', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '449', 'type': 'identifier', 'children': [], 'value': 'mapping'}; {'id': '450', 'type': 'identifier', 'children': [], 'value': 'MeanInsertSize'}; {'id': '451', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '452', 'type': 'expression_statement', 'children': ['453']}; {'id': '453', 'type': 'assignment', 'children': ['454', '459']}; {'id': '454', 'type': 'attribute', 'children': ['455', '458']}; {'id': '455', 'type': 'attribute', 'children': ['456', '457']}; {'id': '456', 'type': 'identifier', 'children': [], 'value': 'sample'}; {'id': '457', 'type': 'identifier', 'children': [], 'value': 'mapping'}; {'id': '458', 'type': 'identifier', 'children': [], 'value': 'MeanCoveragedata'}; {'id': '459', 'type': 'string', 'children': [], 'value': "'NA'"}; {'id': '460', 'type': 'expression_statement', 'children': ['461']}; {'id': '461', 'type': 'call', 'children': ['462', '467']}; {'id': '462', 'type': 'attribute', 'children': ['463', '466']}; {'id': '463', 'type': 'attribute', 'children': ['464', '465']}; {'id': '464', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '465', 'type': 'identifier', 'children': [], 'value': 'bowqueue'}; {'id': '466', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '467', 'type': 'argument_list', 'children': []}
Create threads and commands for performing reference mapping for qualimap analyses
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'run'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'while_statement', 'children': ['7', '15']}; {'id': '7', 'type': 'not_operator', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '14']}; {'id': '9', 'type': 'attribute', 'children': ['10', '13']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'stopped'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'isSet'}; {'id': '14', 'type': 'argument_list', 'children': []}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'try_statement', 'children': ['17', '158']}; {'id': '17', 'type': 'block', 'children': ['18', '31', '53', '71', '82', '108', '120', '131']}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'timeout'}; {'id': '21', 'type': 'boolean_operator', 'children': ['22', '30'], 'value': 'or'}; {'id': '22', 'type': 'boolean_operator', 'children': ['23', '29'], 'value': 'and'}; {'id': '23', 'type': '()', 'children': ['24']}; {'id': '24', 'type': 'comparison_operator', 'children': ['25', '28'], 'value': '!='}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': '_state'}; {'id': '28', 'type': 'string', 'children': [], 'value': "'idle'"}; {'id': '29', 'type': 'float', 'children': [], 'value': '0.2'}; {'id': '30', 'type': 'None', 'children': []}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '37']}; {'id': '33', 'type': 'pattern_list', 'children': ['34', '35', '36']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'rdlist'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'select'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'select'}; {'id': '41', 'type': 'argument_list', 'children': ['42', '50', '51', '52']}; {'id': '42', 'type': 'list', 'children': ['43'], 'value': '[self._socket.fileno()]'}; {'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': '_socket'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'fileno'}; {'id': '49', 'type': 'argument_list', 'children': []}; {'id': '50', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '51', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'timeout'}; {'id': '53', 'type': 'if_statement', 'children': ['54', '56']}; {'id': '54', 'type': 'not_operator', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'rdlist'}; {'id': '56', 'type': 'block', 'children': ['57', '70']}; {'id': '57', 'type': 'if_statement', 'children': ['58', '63']}; {'id': '58', 'type': 'comparison_operator', 'children': ['59', '62'], 'value': '!='}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': '_state'}; {'id': '62', 'type': 'string', 'children': [], 'value': "'idle'"}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': '_state'}; {'id': '69', 'type': 'string', 'children': [], 'value': "'idle'"}; {'id': '70', 'type': 'continue_statement', 'children': []}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'assignment', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'data'}; {'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': '_socket'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'recv'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'integer', 'children': [], 'value': '1024'}; {'id': '82', 'type': 'if_statement', 'children': ['83', '85']}; {'id': '83', 'type': 'not_operator', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '85', 'type': 'block', 'children': ['86', '107']}; {'id': '86', 'type': 'try_statement', 'children': ['87', '101']}; {'id': '87', 'type': 'block', 'children': ['88']}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'fstat'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '100']}; {'id': '95', 'type': 'attribute', 'children': ['96', '99']}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'recv'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': '_socket'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'fileno'}; {'id': '100', 'type': 'argument_list', 'children': []}; {'id': '101', 'type': 'except_clause', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'socket'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '105', 'type': 'block', 'children': ['106']}; {'id': '106', 'type': 'break_statement', 'children': []}; {'id': '107', 'type': 'continue_statement', 'children': []}; {'id': '108', 'type': 'expression_statement', 'children': ['109']}; {'id': '109', 'type': 'assignment', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'mangleIR'}; {'id': '115', 'type': 'argument_list', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '117', 'type': 'keyword_argument', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'ignore_errors'}; {'id': '119', 'type': 'True', 'children': []}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'codeName'}; {'id': '123', 'type': 'call', 'children': ['124', '129']}; {'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': 'codeMap'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '129', 'type': 'argument_list', 'children': ['130']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '131', 'type': 'if_statement', 'children': ['132', '140']}; {'id': '132', 'type': 'boolean_operator', 'children': ['133', '134'], 'value': 'and'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'codeName'}; {'id': '134', 'type': '()', 'children': ['135']}; {'id': '135', 'type': 'comparison_operator', 'children': ['136', '139'], 'value': '!='}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': '_state'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'codeName'}; {'id': '140', 'type': 'block', 'children': ['141', '147']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': '_state'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'codeName'}; {'id': '147', 'type': 'for_statement', 'children': ['148', '149', '152']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'callback'}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': '_callbacks'}; {'id': '152', 'type': 'block', 'children': ['153']}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'call', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'callback'}; {'id': '156', 'type': 'argument_list', 'children': ['157']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'codeName'}; {'id': '158', 'type': 'except_clause', 'children': ['159']}; {'id': '159', 'type': 'block', 'children': ['160']}; {'id': '160', 'type': 'expression_statement', 'children': ['161']}; {'id': '161', 'type': 'call', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'sleep'}; {'id': '165', 'type': 'argument_list', 'children': ['166']}; {'id': '166', 'type': 'float', 'children': [], 'value': '0.1'}
Main loop of KIRA thread.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_inc'}; {'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': 'native'}; {'id': '7', 'type': 'False', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '67', '167', '256', '267']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '15']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '14'], 'value': '=='}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '14', 'type': 'string', 'children': [], 'value': "'v7.0A'"}; {'id': '15', 'type': 'block', 'children': ['16', '30', '54', '65']}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'include'}; {'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': 'os'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '25', 'type': 'argument_list', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '29', 'type': 'string', 'children': [], 'value': "'include'"}; {'id': '30', 'type': 'if_statement', 'children': ['31', '39']}; {'id': '31', 'type': 'call', 'children': ['32', '37']}; {'id': '32', 'type': 'attribute', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '39', 'type': 'block', 'children': ['40', '51']}; {'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': 'logging'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '45', 'type': 'argument_list', 'children': ['46', '50']}; {'id': '46', 'type': 'call', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'string', 'children': [], 'value': "'using include: %s'"}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '51', 'type': 'return_statement', 'children': ['52']}; {'id': '52', 'type': 'list', 'children': ['53'], 'value': '[include]'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'include'}; {'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': 'logging'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '64']}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'string', 'children': [], 'value': "'include not found: %s'"}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '65', 'type': 'return_statement', 'children': ['66']}; {'id': '66', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '67', 'type': 'if_statement', 'children': ['68', '73']}; {'id': '68', 'type': 'comparison_operator', 'children': ['69', '72'], 'value': '=='}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '72', 'type': 'string', 'children': [], 'value': "'v8.1'"}; {'id': '73', 'type': 'block', 'children': ['74', '78', '105', '165']}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '77', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '78', 'type': 'if_statement', 'children': ['79', '80', '96']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'native'}; {'id': '80', 'type': 'block', 'children': ['81']}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'assignment', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '84', 'type': 'list', 'children': ['85', '86', '95'], 'value': "['km', os.path.join('km', 'crt'), 'shared']"}; {'id': '85', 'type': 'string', 'children': [], 'value': "'km'"}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '92', 'type': 'argument_list', 'children': ['93', '94']}; {'id': '93', 'type': 'string', 'children': [], 'value': "'km'"}; {'id': '94', 'type': 'string', 'children': [], 'value': "'crt'"}; {'id': '95', 'type': 'string', 'children': [], 'value': "'shared'"}; {'id': '96', 'type': 'else_clause', 'children': ['97']}; {'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': 'parts'}; {'id': '101', 'type': 'list', 'children': ['102', '103', '104'], 'value': "['um', 'winrt', 'shared']"}; {'id': '102', 'type': 'string', 'children': [], 'value': "'um'"}; {'id': '103', 'type': 'string', 'children': [], 'value': "'winrt'"}; {'id': '104', 'type': 'string', 'children': [], 'value': "'shared'"}; {'id': '105', 'type': 'for_statement', 'children': ['106', '107', '108']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'part'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'parts'}; {'id': '108', 'type': 'block', 'children': ['109', '124']}; {'id': '109', 'type': 'expression_statement', 'children': ['110']}; {'id': '110', 'type': 'assignment', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '112', 'type': 'call', 'children': ['113', '118']}; {'id': '113', 'type': 'attribute', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '122', '123']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'include'"}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'part'}; {'id': '124', 'type': 'if_statement', 'children': ['125', '133', '152']}; {'id': '125', 'type': 'call', 'children': ['126', '131']}; {'id': '126', 'type': 'attribute', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '133', 'type': 'block', 'children': ['134', '145']}; {'id': '134', 'type': 'expression_statement', 'children': ['135']}; {'id': '135', 'type': 'call', 'children': ['136', '139']}; {'id': '136', 'type': 'attribute', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '139', 'type': 'argument_list', 'children': ['140', '144']}; {'id': '140', 'type': 'call', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '142', 'type': 'argument_list', 'children': ['143']}; {'id': '143', 'type': 'string', 'children': [], 'value': "'using include: %s'"}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'call', 'children': ['147', '150']}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '150', 'type': 'argument_list', 'children': ['151']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '152', 'type': 'else_clause', 'children': ['153']}; {'id': '153', 'type': 'block', 'children': ['154']}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'call', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '159', 'type': 'argument_list', 'children': ['160', '164']}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'string', 'children': [], 'value': "'inc not found: %s'"}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '165', 'type': 'return_statement', 'children': ['166']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '167', 'type': 'if_statement', 'children': ['168', '173']}; {'id': '168', 'type': 'comparison_operator', 'children': ['169', '172'], 'value': '=='}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '172', 'type': 'string', 'children': [], 'value': "'v10.0'"}; {'id': '173', 'type': 'block', 'children': ['174', '178', '190', '254']}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'assignment', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '177', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '178', 'type': 'expression_statement', 'children': ['179']}; {'id': '179', 'type': 'assignment', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '181', 'type': 'call', 'children': ['182', '187']}; {'id': '182', 'type': 'attribute', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '187', 'type': 'argument_list', 'children': ['188', '189']}; {'id': '188', 'type': 'string', 'children': [], 'value': "'include'"}; {'id': '189', 'type': 'string', 'children': [], 'value': "'10.0.10240.0'"}; {'id': '190', 'type': 'for_statement', 'children': ['191', '192', '197']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '192', 'type': 'list', 'children': ['193', '194', '195', '196'], 'value': "['um', 'ucrt', 'shared', 'winrt']"}; {'id': '193', 'type': 'string', 'children': [], 'value': "'um'"}; {'id': '194', 'type': 'string', 'children': [], 'value': "'ucrt'"}; {'id': '195', 'type': 'string', 'children': [], 'value': "'shared'"}; {'id': '196', 'type': 'string', 'children': [], 'value': "'winrt'"}; {'id': '197', 'type': 'block', 'children': ['198', '213']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '201', 'type': 'call', 'children': ['202', '207']}; {'id': '202', 'type': 'attribute', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '207', 'type': 'argument_list', 'children': ['208', '211', '212']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '213', 'type': 'if_statement', 'children': ['214', '222', '241']}; {'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': 'os'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '220', 'type': 'argument_list', 'children': ['221']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '222', 'type': 'block', 'children': ['223', '234']}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '228', 'type': 'argument_list', 'children': ['229', '233']}; {'id': '229', 'type': 'call', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '231', 'type': 'argument_list', 'children': ['232']}; {'id': '232', 'type': 'string', 'children': [], 'value': "'using include: %s'"}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '239', 'type': 'argument_list', 'children': ['240']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '241', 'type': 'else_clause', 'children': ['242']}; {'id': '242', 'type': 'block', 'children': ['243']}; {'id': '243', 'type': 'expression_statement', 'children': ['244']}; {'id': '244', 'type': 'call', 'children': ['245', '248']}; {'id': '245', 'type': 'attribute', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '253']}; {'id': '249', 'type': 'call', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '251', 'type': 'argument_list', 'children': ['252']}; {'id': '252', 'type': 'string', 'children': [], 'value': "'inc not found: %s'"}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'include'}; {'id': '254', 'type': 'return_statement', 'children': ['255']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '256', 'type': 'expression_statement', 'children': ['257']}; {'id': '257', 'type': 'assignment', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '259', 'type': 'call', 'children': ['260', '263']}; {'id': '260', 'type': 'attribute', 'children': ['261', '262']}; {'id': '261', 'type': 'string', 'children': [], 'value': "'unknown sdk version: {}'"}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '263', 'type': 'argument_list', 'children': ['264']}; {'id': '264', 'type': 'attribute', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '267', 'type': 'raise_statement', 'children': ['268']}; {'id': '268', 'type': 'call', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'RuntimeError'}; {'id': '270', 'type': 'argument_list', 'children': ['271']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'message'}
Get include directories of Windows SDK.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_lib'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '7', 'type': 'string', 'children': [], 'value': "'x86'"}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'native'}; {'id': '10', 'type': 'False', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12', '80', '169', '257', '268']}; {'id': '12', 'type': 'if_statement', 'children': ['13', '18']}; {'id': '13', 'type': 'comparison_operator', 'children': ['14', '17'], 'value': '=='}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '17', 'type': 'string', 'children': [], 'value': "'v7.0A'"}; {'id': '18', 'type': 'block', 'children': ['19', '28', '43', '67', '78']}; {'id': '19', 'type': 'if_statement', 'children': ['20', '23']}; {'id': '20', 'type': 'comparison_operator', 'children': ['21', '22'], 'value': '=='}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '22', 'type': 'string', 'children': [], 'value': "'x86'"}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '27', 'type': 'string', 'children': [], 'value': "''"}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '31', 'type': 'call', 'children': ['32', '37']}; {'id': '32', 'type': 'attribute', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '37', 'type': 'argument_list', 'children': ['38', '41', '42']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '41', 'type': 'string', 'children': [], 'value': "'lib'"}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '43', 'type': 'if_statement', 'children': ['44', '52']}; {'id': '44', 'type': 'call', 'children': ['45', '50']}; {'id': '45', 'type': 'attribute', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '52', 'type': 'block', 'children': ['53', '64']}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'call', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '58', 'type': 'argument_list', 'children': ['59', '63']}; {'id': '59', 'type': 'call', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'string', 'children': [], 'value': "'using lib: %s'"}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '64', 'type': 'return_statement', 'children': ['65']}; {'id': '65', 'type': 'list', 'children': ['66'], 'value': '[lib]'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '72', 'type': 'argument_list', 'children': ['73', '77']}; {'id': '73', 'type': 'call', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'string', 'children': [], 'value': "'lib not found: %s'"}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '78', 'type': 'return_statement', 'children': ['79']}; {'id': '79', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '80', 'type': 'if_statement', 'children': ['81', '86']}; {'id': '81', 'type': 'comparison_operator', 'children': ['82', '85'], 'value': '=='}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '85', 'type': 'string', 'children': [], 'value': "'v8.1'"}; {'id': '86', 'type': 'block', 'children': ['87', '116', '132', '156', '167']}; {'id': '87', 'type': 'if_statement', 'children': ['88', '89', '102']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'native'}; {'id': '89', 'type': 'block', 'children': ['90']}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'assignment', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '93', 'type': 'call', 'children': ['94', '99']}; {'id': '94', 'type': 'attribute', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '99', 'type': 'argument_list', 'children': ['100', '101']}; {'id': '100', 'type': 'string', 'children': [], 'value': "'winv6.3'"}; {'id': '101', 'type': 'string', 'children': [], 'value': "'km'"}; {'id': '102', 'type': 'else_clause', 'children': ['103']}; {'id': '103', 'type': 'block', 'children': ['104']}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'assignment', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '107', 'type': 'call', 'children': ['108', '113']}; {'id': '108', 'type': 'attribute', 'children': ['109', '112']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '113', 'type': 'argument_list', 'children': ['114', '115']}; {'id': '114', 'type': 'string', 'children': [], 'value': "'winv6.3'"}; {'id': '115', 'type': 'string', 'children': [], 'value': "'um'"}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'assignment', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '119', 'type': 'call', 'children': ['120', '125']}; {'id': '120', 'type': 'attribute', 'children': ['121', '124']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '125', 'type': 'argument_list', 'children': ['126', '129', '130', '131']}; {'id': '126', 'type': 'attribute', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '129', 'type': 'string', 'children': [], 'value': "'lib'"}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '132', 'type': 'if_statement', 'children': ['133', '141']}; {'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': 'os'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '141', 'type': 'block', 'children': ['142', '153']}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'call', 'children': ['144', '147']}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '147', 'type': 'argument_list', 'children': ['148', '152']}; {'id': '148', 'type': 'call', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '150', 'type': 'argument_list', 'children': ['151']}; {'id': '151', 'type': 'string', 'children': [], 'value': "'using lib: %s'"}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '153', 'type': 'return_statement', 'children': ['154']}; {'id': '154', 'type': 'list', 'children': ['155'], 'value': '[lib]'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '156', 'type': 'expression_statement', 'children': ['157']}; {'id': '157', 'type': 'call', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '161', 'type': 'argument_list', 'children': ['162', '166']}; {'id': '162', 'type': 'call', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'string', 'children': [], 'value': "'lib not found: %s'"}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '167', 'type': 'return_statement', 'children': ['168']}; {'id': '168', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '169', 'type': 'if_statement', 'children': ['170', '175']}; {'id': '170', 'type': 'comparison_operator', 'children': ['171', '174'], 'value': '=='}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '174', 'type': 'string', 'children': [], 'value': "'v10.0'"}; {'id': '175', 'type': 'block', 'children': ['176', '180', '192', '255']}; {'id': '176', 'type': 'expression_statement', 'children': ['177']}; {'id': '177', 'type': 'assignment', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '179', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '180', 'type': 'expression_statement', 'children': ['181']}; {'id': '181', 'type': 'assignment', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '183', 'type': 'call', 'children': ['184', '189']}; {'id': '184', 'type': 'attribute', 'children': ['185', '188']}; {'id': '185', 'type': 'attribute', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '189', 'type': 'argument_list', 'children': ['190', '191']}; {'id': '190', 'type': 'string', 'children': [], 'value': "'lib'"}; {'id': '191', 'type': 'string', 'children': [], 'value': "'10.0.10240.0'"}; {'id': '192', 'type': 'for_statement', 'children': ['193', '194', '197']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '194', 'type': 'list', 'children': ['195', '196'], 'value': "['um', 'ucrt']"}; {'id': '195', 'type': 'string', 'children': [], 'value': "'um'"}; {'id': '196', 'type': 'string', 'children': [], 'value': "'ucrt'"}; {'id': '197', 'type': 'block', 'children': ['198', '214']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '201', 'type': 'call', 'children': ['202', '207']}; {'id': '202', 'type': 'attribute', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '207', 'type': 'argument_list', 'children': ['208', '211', '212', '213']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'sdk_dir'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'extra'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'mode'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'arch'}; {'id': '214', 'type': 'if_statement', 'children': ['215', '223', '242']}; {'id': '215', 'type': 'call', 'children': ['216', '221']}; {'id': '216', 'type': 'attribute', 'children': ['217', '220']}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '221', 'type': 'argument_list', 'children': ['222']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '223', 'type': 'block', 'children': ['224', '235']}; {'id': '224', 'type': 'expression_statement', 'children': ['225']}; {'id': '225', 'type': 'call', 'children': ['226', '229']}; {'id': '226', 'type': 'attribute', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '229', 'type': 'argument_list', 'children': ['230', '234']}; {'id': '230', 'type': 'call', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '232', 'type': 'argument_list', 'children': ['233']}; {'id': '233', 'type': 'string', 'children': [], 'value': "'using lib: %s'"}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'call', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '240', 'type': 'argument_list', 'children': ['241']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '242', 'type': 'else_clause', 'children': ['243']}; {'id': '243', 'type': 'block', 'children': ['244']}; {'id': '244', 'type': 'expression_statement', 'children': ['245']}; {'id': '245', 'type': 'call', 'children': ['246', '249']}; {'id': '246', 'type': 'attribute', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '249', 'type': 'argument_list', 'children': ['250', '254']}; {'id': '250', 'type': 'call', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '252', 'type': 'argument_list', 'children': ['253']}; {'id': '253', 'type': 'string', 'children': [], 'value': "'lib not found: %s'"}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '255', 'type': 'return_statement', 'children': ['256']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'dirs'}; {'id': '257', 'type': 'expression_statement', 'children': ['258']}; {'id': '258', 'type': 'assignment', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '260', 'type': 'call', 'children': ['261', '264']}; {'id': '261', 'type': 'attribute', 'children': ['262', '263']}; {'id': '262', 'type': 'string', 'children': [], 'value': "'unknown sdk version: {}'"}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '264', 'type': 'argument_list', 'children': ['265']}; {'id': '265', 'type': 'attribute', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'sdk_version'}; {'id': '268', 'type': 'raise_statement', 'children': ['269']}; {'id': '269', 'type': 'call', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'RuntimeError'}; {'id': '271', 'type': 'argument_list', 'children': ['272']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'message'}
Get lib directories of Windows SDK.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'interrogate'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'platformIdentifier'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'configuration'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'libraries'}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'libOverrides'}; {'id': '10', 'type': 'dictionary', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12', '27', '33', '331', '348', '359']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'libModules'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'list_comprehension', 'children': ['19', '20', '23']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '20', 'type': 'for_in_clause', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'libraries'}; {'id': '23', 'type': 'if_clause', 'children': ['24']}; {'id': '24', 'type': 'comparison_operator', 'children': ['25', '26'], 'value': 'not'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'libOverrides'}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '30', 'type': 'call', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'ThirdPartyLibraryDetails'}; {'id': '32', 'type': 'argument_list', 'children': []}; {'id': '33', 'type': 'if_statement', 'children': ['34', '40']}; {'id': '34', 'type': 'comparison_operator', 'children': ['35', '39'], 'value': '>'}; {'id': '35', 'type': 'call', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'libModules'}; {'id': '39', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '40', 'type': 'block', 'children': ['41', '51', '65', '75', '91', '113', '199', '210', '214', '249', '255', '269', '275', '306']}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'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': '_getThirdPartyLibs'}; {'id': '48', 'type': 'argument_list', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'platformIdentifier'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'configuration'}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '54', 'type': 'list_comprehension', 'children': ['55', '56', '59']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '56', 'type': 'for_in_clause', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '59', 'type': 'if_clause', 'children': ['60']}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '64'], 'value': 'in'}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'Name'"}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'libModules'}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'assignment', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '68', 'type': 'list_comprehension', 'children': ['69', '72']}; {'id': '69', 'type': 'subscript', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '71', 'type': 'string', 'children': [], 'value': "'Name'"}; {'id': '72', 'type': 'for_in_clause', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'assignment', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'unsupported'}; {'id': '78', 'type': 'list_comprehension', 'children': ['79', '84', '87']}; {'id': '79', 'type': 'binary_operator', 'children': ['80', '83'], 'value': '+'}; {'id': '80', 'type': 'binary_operator', 'children': ['81', '82'], 'value': '+'}; {'id': '81', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '83', 'type': 'string', 'children': [], 'value': '\'"\''}; {'id': '84', 'type': 'for_in_clause', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'libModules'}; {'id': '87', 'type': 'if_clause', 'children': ['88']}; {'id': '88', 'type': 'comparison_operator', 'children': ['89', '90'], 'value': 'not'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '91', 'type': 'if_statement', 'children': ['92', '98']}; {'id': '92', 'type': 'comparison_operator', 'children': ['93', '97'], 'value': '>'}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'unsupported'}; {'id': '97', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '98', 'type': 'block', 'children': ['99']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'call', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'Utility'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'printStderr'}; {'id': '104', 'type': 'argument_list', 'children': ['105']}; {'id': '105', 'type': 'binary_operator', 'children': ['106', '107'], 'value': '+'}; {'id': '106', 'type': 'string', 'children': [], 'value': "'Warning: unsupported libraries '"}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'string', 'children': [], 'value': "','"}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'unsupported'}; {'id': '113', 'type': 'for_statement', 'children': ['114', '115', '116']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '116', 'type': 'block', 'children': ['117']}; {'id': '117', 'type': 'if_statement', 'children': ['118', '135']}; {'id': '118', 'type': 'boolean_operator', 'children': ['119', '127'], 'value': 'and'}; {'id': '119', 'type': 'comparison_operator', 'children': ['120', '126'], 'value': '>'}; {'id': '120', 'type': 'call', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'subscript', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '125', 'type': 'string', 'children': [], 'value': "'PublicAdditionalLibraries'"}; {'id': '126', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '127', 'type': 'comparison_operator', 'children': ['128', '134'], 'value': '>'}; {'id': '128', 'type': 'call', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'subscript', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '133', 'type': 'string', 'children': [], 'value': "'PublicLibraryPaths'"}; {'id': '134', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '135', 'type': 'block', 'children': ['136', '150', '169', '193']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'libPath'}; {'id': '139', 'type': 'subscript', 'children': ['140', '149']}; {'id': '140', 'type': '()', 'children': ['141']}; {'id': '141', 'type': 'call', 'children': ['142', '145']}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': '_absolutePaths'}; {'id': '145', 'type': 'argument_list', 'children': ['146']}; {'id': '146', 'type': 'subscript', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '148', 'type': 'string', 'children': [], 'value': "'PublicLibraryPaths'"}; {'id': '149', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'libs'}; {'id': '153', 'type': 'call', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'list_comprehension', 'children': ['157', '164']}; {'id': '157', 'type': 'call', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '161', 'type': 'argument_list', 'children': ['162', '163']}; {'id': '162', 'type': 'string', 'children': [], 'value': "'\\\\'"}; {'id': '163', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '164', 'type': 'for_in_clause', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '166', 'type': 'subscript', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '168', 'type': 'string', 'children': [], 'value': "'PublicAdditionalLibraries'"}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'assignment', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'libs'}; {'id': '172', 'type': 'call', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'list_comprehension', 'children': ['176', '190']}; {'id': '176', 'type': 'conditional_expression', 'children': ['177', '186', '189'], 'value': 'if'}; {'id': '177', 'type': 'call', 'children': ['178', '183']}; {'id': '178', 'type': 'attribute', 'children': ['179', '182']}; {'id': '179', 'type': 'attribute', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '183', 'type': 'argument_list', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'libPath'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '186', 'type': 'comparison_operator', 'children': ['187', '188'], 'value': 'not'}; {'id': '187', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '190', 'type': 'for_in_clause', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'libs'}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '198']}; {'id': '195', 'type': 'subscript', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'module'}; {'id': '197', 'type': 'string', 'children': [], 'value': "'PublicAdditionalLibraries'"}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'libs'}; {'id': '199', 'type': 'expression_statement', 'children': ['200']}; {'id': '200', 'type': 'assignment', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '202', 'type': 'list', 'children': ['203', '204', '205', '206', '207', '208', '209'], 'value': "[\n\t\t\t\t'Directory',\n\t\t\t\t'PublicAdditionalLibraries',\n\t\t\t\t'PublicLibraryPaths',\n\t\t\t\t'PublicSystemIncludePaths',\n\t\t\t\t'PublicIncludePaths',\n\t\t\t\t'PrivateIncludePaths',\n\t\t\t\t'PublicDefinitions'\n\t\t\t]"}; {'id': '203', 'type': 'string', 'children': [], 'value': "'Directory'"}; {'id': '204', 'type': 'string', 'children': [], 'value': "'PublicAdditionalLibraries'"}; {'id': '205', 'type': 'string', 'children': [], 'value': "'PublicLibraryPaths'"}; {'id': '206', 'type': 'string', 'children': [], 'value': "'PublicSystemIncludePaths'"}; {'id': '207', 'type': 'string', 'children': [], 'value': "'PublicIncludePaths'"}; {'id': '208', 'type': 'string', 'children': [], 'value': "'PrivateIncludePaths'"}; {'id': '209', 'type': 'string', 'children': [], 'value': "'PublicDefinitions'"}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'assignment', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '213', 'type': 'dictionary', 'children': []}; {'id': '214', 'type': 'for_statement', 'children': ['215', '216', '217']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '217', 'type': 'block', 'children': ['218', '236']}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'assignment', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'transform'}; {'id': '221', 'type': 'conditional_expression', 'children': ['222', '232', '235'], 'value': 'if'}; {'id': '222', 'type': '()', 'children': ['223']}; {'id': '223', 'type': 'lambda', 'children': ['224', '226']}; {'id': '224', 'type': 'lambda_parameters', 'children': ['225']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '226', 'type': 'call', 'children': ['227', '230']}; {'id': '227', 'type': 'attribute', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': '_absolutePaths'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'l'}; {'id': '232', 'type': 'comparison_operator', 'children': ['233', '234'], 'value': '!='}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '234', 'type': 'string', 'children': [], 'value': "'Definitions'"}; {'id': '235', 'type': 'None', 'children': []}; {'id': '236', 'type': 'expression_statement', 'children': ['237']}; {'id': '237', 'type': 'assignment', 'children': ['238', '241']}; {'id': '238', 'type': 'subscript', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '241', 'type': 'call', 'children': ['242', '245']}; {'id': '242', 'type': 'attribute', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '244', 'type': 'identifier', 'children': [], 'value': '_flatten'}; {'id': '245', 'type': 'argument_list', 'children': ['246', '247', '248']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'field'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'transform'}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'libraryDirectories'}; {'id': '252', 'type': 'subscript', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '254', 'type': 'string', 'children': [], 'value': "'PublicLibraryPaths'"}; {'id': '255', 'type': 'expression_statement', 'children': ['256']}; {'id': '256', 'type': 'assignment', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'headerDirectories'}; {'id': '258', 'type': 'binary_operator', 'children': ['259', '266'], 'value': '+'}; {'id': '259', 'type': 'binary_operator', 'children': ['260', '263'], 'value': '+'}; {'id': '260', 'type': 'subscript', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '262', 'type': 'string', 'children': [], 'value': "'PublicSystemIncludePaths'"}; {'id': '263', 'type': 'subscript', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '265', 'type': 'string', 'children': [], 'value': "'PublicIncludePaths'"}; {'id': '266', 'type': 'subscript', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '268', 'type': 'string', 'children': [], 'value': "'PrivateIncludePaths'"}; {'id': '269', 'type': 'expression_statement', 'children': ['270']}; {'id': '270', 'type': 'assignment', 'children': ['271', '272']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'modulePaths'}; {'id': '272', 'type': 'subscript', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '274', 'type': 'string', 'children': [], 'value': "'Directory'"}; {'id': '275', 'type': 'expression_statement', 'children': ['276']}; {'id': '276', 'type': 'assignment', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'prefixDirectories'}; {'id': '278', 'type': 'call', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '280', 'type': 'argument_list', 'children': ['281']}; {'id': '281', 'type': 'call', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '283', 'type': 'argument_list', 'children': ['284']}; {'id': '284', 'type': 'binary_operator', 'children': ['285', '292'], 'value': '+'}; {'id': '285', 'type': 'binary_operator', 'children': ['286', '291'], 'value': '+'}; {'id': '286', 'type': 'binary_operator', 'children': ['287', '290'], 'value': '+'}; {'id': '287', 'type': 'subscript', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '289', 'type': 'string', 'children': [], 'value': "'Directory'"}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'headerDirectories'}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'libraryDirectories'}; {'id': '292', 'type': 'list_comprehension', 'children': ['293', '301']}; {'id': '293', 'type': 'call', 'children': ['294', '299']}; {'id': '294', 'type': 'attribute', 'children': ['295', '298']}; {'id': '295', 'type': 'attribute', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'dirname'}; {'id': '299', 'type': 'argument_list', 'children': ['300']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '301', 'type': 'for_in_clause', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '303', 'type': 'binary_operator', 'children': ['304', '305'], 'value': '+'}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'headerDirectories'}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'libraryDirectories'}; {'id': '306', 'type': 'expression_statement', 'children': ['307']}; {'id': '307', 'type': 'assignment', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '309', 'type': 'call', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'ThirdPartyLibraryDetails'}; {'id': '311', 'type': 'argument_list', 'children': ['312', '315', '318', '321', '326']}; {'id': '312', 'type': 'keyword_argument', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'prefixDirs'}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'prefixDirectories'}; {'id': '315', 'type': 'keyword_argument', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'includeDirs'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'headerDirectories'}; {'id': '318', 'type': 'keyword_argument', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'linkDirs'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'libraryDirectories'}; {'id': '321', 'type': 'keyword_argument', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'definitions'}; {'id': '323', 'type': 'subscript', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '325', 'type': 'string', 'children': [], 'value': "'PublicDefinitions'"}; {'id': '326', 'type': 'keyword_argument', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'libs'}; {'id': '328', 'type': 'subscript', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'flattened'}; {'id': '330', 'type': 'string', 'children': [], 'value': "'PublicAdditionalLibraries'"}; {'id': '331', 'type': 'expression_statement', 'children': ['332']}; {'id': '332', 'type': 'assignment', 'children': ['333', '334']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'overridesToApply'}; {'id': '334', 'type': 'call', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '336', 'type': 'argument_list', 'children': ['337']}; {'id': '337', 'type': 'list_comprehension', 'children': ['338', '341', '344']}; {'id': '338', 'type': 'subscript', 'children': ['339', '340']}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'libOverrides'}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '341', 'type': 'for_in_clause', 'children': ['342', '343']}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'libraries'}; {'id': '344', 'type': 'if_clause', 'children': ['345']}; {'id': '345', 'type': 'comparison_operator', 'children': ['346', '347'], 'value': 'in'}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'lib'}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'libOverrides'}; {'id': '348', 'type': 'for_statement', 'children': ['349', '350', '351']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'override'}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'overridesToApply'}; {'id': '351', 'type': 'block', 'children': ['352']}; {'id': '352', 'type': 'expression_statement', 'children': ['353']}; {'id': '353', 'type': 'call', 'children': ['354', '357']}; {'id': '354', 'type': 'attribute', 'children': ['355', '356']}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'details'}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'merge'}; {'id': '357', 'type': 'argument_list', 'children': ['358']}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'override'}; {'id': '359', 'type': 'return_statement', 'children': ['360']}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'details'}
Interrogates UnrealBuildTool about the build flags for the specified third-party libraries
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_getThirdPartyLibs'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'platformIdentifier'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'configuration'}; {'id': '7', 'type': 'block', 'children': ['8', '20', '27', '35', '47', '63', '69', '92', '105', '154', '168', '182', '198', '215', '227', '238']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'cachedList'}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'CachedDataManager'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'getCachedDataKey'}; {'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': 'engineVersionHash'}; {'id': '19', 'type': 'string', 'children': [], 'value': "'ThirdPartyLibraries'"}; {'id': '20', 'type': 'if_statement', 'children': ['21', '24']}; {'id': '21', 'type': 'comparison_operator', 'children': ['22', '23'], 'value': '!='}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'cachedList'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'return_statement', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'cachedList'}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'tempDir'}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'tempfile'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'mkdtemp'}; {'id': '34', 'type': 'argument_list', 'children': []}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'jsonFile'}; {'id': '38', 'type': 'call', 'children': ['39', '44']}; {'id': '39', 'type': 'attribute', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '44', 'type': 'argument_list', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'tempDir'}; {'id': '46', 'type': 'string', 'children': [], 'value': "'ubt_output.json'"}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'sentinelFile'}; {'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': 'os'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '56', 'type': 'argument_list', 'children': ['57', '60', '61', '62']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'engineRoot'}; {'id': '60', 'type': 'string', 'children': [], 'value': "'Engine'"}; {'id': '61', 'type': 'string', 'children': [], 'value': "'Build'"}; {'id': '62', 'type': 'string', 'children': [], 'value': "'InstalledBuild.txt'"}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'sentinelBackup'}; {'id': '66', 'type': 'binary_operator', 'children': ['67', '68'], 'value': '+'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'sentinelFile'}; {'id': '68', 'type': 'string', 'children': [], 'value': "'.bak'"}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'renameSentinel'}; {'id': '72', 'type': 'boolean_operator', 'children': ['73', '81'], 'value': 'and'}; {'id': '73', 'type': 'call', 'children': ['74', '79']}; {'id': '74', 'type': 'attribute', 'children': ['75', '78']}; {'id': '75', 'type': 'attribute', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'exists'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'sentinelFile'}; {'id': '81', 'type': 'comparison_operator', 'children': ['82', '91'], 'value': '=='}; {'id': '82', 'type': 'call', 'children': ['83', '88']}; {'id': '83', 'type': 'attribute', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '88', 'type': 'argument_list', 'children': ['89', '90']}; {'id': '89', 'type': 'string', 'children': [], 'value': "'UE4CLI_SENTINEL_RENAME'"}; {'id': '90', 'type': 'string', 'children': [], 'value': "'0'"}; {'id': '91', 'type': 'string', 'children': [], 'value': "'1'"}; {'id': '92', 'type': 'if_statement', 'children': ['93', '96']}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '95'], 'value': '=='}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'renameSentinel'}; {'id': '95', 'type': 'True', 'children': []}; {'id': '96', 'type': 'block', 'children': ['97']}; {'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': 'shutil'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'move'}; {'id': '102', 'type': 'argument_list', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'sentinelFile'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'sentinelBackup'}; {'id': '105', 'type': 'try_statement', 'children': ['106', '139']}; {'id': '106', 'type': 'block', 'children': ['107', '129']}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '110', 'type': 'conditional_expression', 'children': ['111', '116', '123'], 'value': 'if'}; {'id': '111', 'type': 'list', 'children': ['112', '113'], 'value': "['-Mode=JsonExport', '-OutputFile=' +jsonFile ]"}; {'id': '112', 'type': 'string', 'children': [], 'value': "'-Mode=JsonExport'"}; {'id': '113', 'type': 'binary_operator', 'children': ['114', '115'], 'value': '+'}; {'id': '114', 'type': 'string', 'children': [], 'value': "'-OutputFile='"}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'jsonFile'}; {'id': '116', 'type': 'comparison_operator', 'children': ['117', '122'], 'value': '>='}; {'id': '117', 'type': 'subscript', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'engineVersion'}; {'id': '121', 'type': 'string', 'children': [], 'value': "'MinorVersion'"}; {'id': '122', 'type': 'integer', 'children': [], 'value': '22'}; {'id': '123', 'type': 'list', 'children': ['124', '125', '128'], 'value': "['-gather', '-jsonexport=' + jsonFile, '-SkipBuild']"}; {'id': '124', 'type': 'string', 'children': [], 'value': "'-gather'"}; {'id': '125', 'type': 'binary_operator', 'children': ['126', '127'], 'value': '+'}; {'id': '126', 'type': 'string', 'children': [], 'value': "'-jsonexport='"}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'jsonFile'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'-SkipBuild'"}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'call', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'runUBTFunc'}; {'id': '134', 'type': 'argument_list', 'children': ['135', '136', '137', '138']}; {'id': '135', 'type': 'string', 'children': [], 'value': "'UE4Editor'"}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'platformIdentifier'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'configuration'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '139', 'type': 'finally_clause', 'children': ['140']}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'if_statement', 'children': ['142', '145']}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '144'], 'value': '=='}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'renameSentinel'}; {'id': '144', 'type': 'True', 'children': []}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '151']}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'shutil'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'move'}; {'id': '151', 'type': 'argument_list', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'sentinelBackup'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'sentinelFile'}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '157', 'type': 'call', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'loads'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'call', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'Utility'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'readFile'}; {'id': '166', 'type': 'argument_list', 'children': ['167']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'jsonFile'}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'assignment', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '171', 'type': 'list_comprehension', 'children': ['172', '177']}; {'id': '172', 'type': 'subscript', 'children': ['173', '176']}; {'id': '173', 'type': 'subscript', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'Modules'"}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '177', 'type': 'for_in_clause', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '179', 'type': 'subscript', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '181', 'type': 'string', 'children': [], 'value': "'Modules'"}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'assignment', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'thirdPartyRoot'}; {'id': '185', 'type': 'call', 'children': ['186', '191']}; {'id': '186', 'type': 'attribute', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '191', 'type': 'argument_list', 'children': ['192', '195', '196', '197']}; {'id': '192', 'type': 'attribute', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'engineRoot'}; {'id': '195', 'type': 'string', 'children': [], 'value': "'Engine'"}; {'id': '196', 'type': 'string', 'children': [], 'value': "'Source'"}; {'id': '197', 'type': 'string', 'children': [], 'value': "'ThirdParty'"}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'thirdparty'}; {'id': '201', 'type': 'call', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'list_comprehension', 'children': ['205', '206', '209']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '206', 'type': 'for_in_clause', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'modules'}; {'id': '209', 'type': 'if_clause', 'children': ['210']}; {'id': '210', 'type': 'comparison_operator', 'children': ['211', '212'], 'value': 'in'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'thirdPartyRoot'}; {'id': '212', 'type': 'subscript', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '214', 'type': 'string', 'children': [], 'value': "'Directory'"}; {'id': '215', 'type': 'try_statement', 'children': ['216', '224']}; {'id': '216', 'type': 'block', 'children': ['217']}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'call', 'children': ['219', '222']}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'shutil'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'rmtree'}; {'id': '222', 'type': 'argument_list', 'children': ['223']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'tempDir'}; {'id': '224', 'type': 'except_clause', 'children': ['225']}; {'id': '225', 'type': 'block', 'children': ['226']}; {'id': '226', 'type': 'pass_statement', 'children': []}; {'id': '227', 'type': 'expression_statement', 'children': ['228']}; {'id': '228', 'type': 'call', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'CachedDataManager'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'setCachedDataKey'}; {'id': '232', 'type': 'argument_list', 'children': ['233', '236', '237']}; {'id': '233', 'type': 'attribute', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'engineVersionHash'}; {'id': '236', 'type': 'string', 'children': [], 'value': "'ThirdPartyLibraries'"}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'thirdparty'}; {'id': '238', 'type': 'return_statement', 'children': ['239']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'thirdparty'}
Runs UnrealBuildTool in JSON export mode and extracts the list of third-party libraries
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_preprocess_scan_params'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'xml_params'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '27', '74', '201']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '10', 'type': 'dictionary', 'children': []}; {'id': '11', 'type': 'for_statement', 'children': ['12', '13', '14']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'xml_params'}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '22']}; {'id': '17', 'type': 'subscript', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '22', 'type': 'boolean_operator', 'children': ['23', '26'], 'value': 'or'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'param'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '26', 'type': 'string', 'children': [], 'value': "''"}; {'id': '27', 'type': 'for_statement', 'children': ['28', '29', '32']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'scanner_params'}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'if_statement', 'children': ['34', '37']}; {'id': '34', 'type': 'comparison_operator', 'children': ['35', '36'], 'value': 'not'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '37', 'type': 'block', 'children': ['38', '49']}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'assignment', 'children': ['40', '43']}; {'id': '40', 'type': 'subscript', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'key'}; {'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': 'get_scanner_param_default'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '49', 'type': 'if_statement', 'children': ['50', '58']}; {'id': '50', 'type': 'comparison_operator', 'children': ['51', '57'], 'value': '=='}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'get_scanner_param_type'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '57', 'type': 'string', 'children': [], 'value': "'selection'"}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '64']}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '64', 'type': 'subscript', 'children': ['65', '73']}; {'id': '65', 'type': 'call', 'children': ['66', '71']}; {'id': '66', 'type': 'attribute', 'children': ['67', '70']}; {'id': '67', 'type': 'subscript', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '71', 'type': 'argument_list', 'children': ['72']}; {'id': '72', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '73', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '74', 'type': 'for_statement', 'children': ['75', '76', '77']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '77', 'type': 'block', 'children': ['78', '87', '92', '123', '179']}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'param_type'}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'get_scanner_param_type'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '87', 'type': 'if_statement', 'children': ['88', '90']}; {'id': '88', 'type': 'not_operator', 'children': ['89']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'param_type'}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'continue_statement', 'children': []}; {'id': '92', 'type': 'if_statement', 'children': ['93', '98']}; {'id': '93', 'type': 'comparison_operator', 'children': ['94', '95'], 'value': 'in'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'param_type'}; {'id': '95', 'type': 'list', 'children': ['96', '97'], 'value': "['integer', 'boolean']"}; {'id': '96', 'type': 'string', 'children': [], 'value': "'integer'"}; {'id': '97', 'type': 'string', 'children': [], 'value': "'boolean'"}; {'id': '98', 'type': 'block', 'children': ['99']}; {'id': '99', 'type': 'try_statement', 'children': ['100', '112']}; {'id': '100', 'type': 'block', 'children': ['101']}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'assignment', 'children': ['103', '106']}; {'id': '103', 'type': 'subscript', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '106', 'type': 'call', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '108', 'type': 'argument_list', 'children': ['109']}; {'id': '109', 'type': 'subscript', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '112', 'type': 'except_clause', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '114', 'type': 'block', 'children': ['115']}; {'id': '115', 'type': 'raise_statement', 'children': ['116']}; {'id': '116', 'type': 'call', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'OSPDError'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '122']}; {'id': '119', 'type': 'binary_operator', 'children': ['120', '121'], 'value': '%'}; {'id': '120', 'type': 'string', 'children': [], 'value': "'Invalid %s value'"}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'start_scan'"}; {'id': '123', 'type': 'if_statement', 'children': ['124', '127', '145']}; {'id': '124', 'type': 'comparison_operator', 'children': ['125', '126'], 'value': '=='}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'param_type'}; {'id': '126', 'type': 'string', 'children': [], 'value': "'boolean'"}; {'id': '127', 'type': 'block', 'children': ['128']}; {'id': '128', 'type': 'if_statement', 'children': ['129', '136']}; {'id': '129', 'type': 'comparison_operator', 'children': ['130', '133'], 'value': 'not'}; {'id': '130', 'type': 'subscript', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '133', 'type': 'list', 'children': ['134', '135'], 'value': '[0, 1]'}; {'id': '134', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '135', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '136', 'type': 'block', 'children': ['137']}; {'id': '137', 'type': 'raise_statement', 'children': ['138']}; {'id': '138', 'type': 'call', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'OSPDError'}; {'id': '140', 'type': 'argument_list', 'children': ['141', '144']}; {'id': '141', 'type': 'binary_operator', 'children': ['142', '143'], 'value': '%'}; {'id': '142', 'type': 'string', 'children': [], 'value': "'Invalid %s value'"}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '144', 'type': 'string', 'children': [], 'value': "'start_scan'"}; {'id': '145', 'type': 'elif_clause', 'children': ['146', '149']}; {'id': '146', 'type': 'comparison_operator', 'children': ['147', '148'], 'value': '=='}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'param_type'}; {'id': '148', 'type': 'string', 'children': [], 'value': "'selection'"}; {'id': '149', 'type': 'block', 'children': ['150', '164']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'selection'}; {'id': '153', 'type': 'call', 'children': ['154', '162']}; {'id': '154', 'type': 'attribute', 'children': ['155', '161']}; {'id': '155', 'type': 'call', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'get_scanner_param_default'}; {'id': '159', 'type': 'argument_list', 'children': ['160']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '164', 'type': 'if_statement', 'children': ['165', '170']}; {'id': '165', 'type': 'comparison_operator', 'children': ['166', '169'], 'value': 'not'}; {'id': '166', 'type': 'subscript', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'selection'}; {'id': '170', 'type': 'block', 'children': ['171']}; {'id': '171', 'type': 'raise_statement', 'children': ['172']}; {'id': '172', 'type': 'call', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'OSPDError'}; {'id': '174', 'type': 'argument_list', 'children': ['175', '178']}; {'id': '175', 'type': 'binary_operator', 'children': ['176', '177'], 'value': '%'}; {'id': '176', 'type': 'string', 'children': [], 'value': "'Invalid %s value'"}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '178', 'type': 'string', 'children': [], 'value': "'start_scan'"}; {'id': '179', 'type': 'if_statement', 'children': ['180', '192']}; {'id': '180', 'type': 'boolean_operator', 'children': ['181', '187'], 'value': 'and'}; {'id': '181', 'type': 'call', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'get_scanner_param_mandatory'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '187', 'type': 'comparison_operator', 'children': ['188', '191'], 'value': '=='}; {'id': '188', 'type': 'subscript', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '191', 'type': 'string', 'children': [], 'value': "''"}; {'id': '192', 'type': 'block', 'children': ['193']}; {'id': '193', 'type': 'raise_statement', 'children': ['194']}; {'id': '194', 'type': 'call', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'OSPDError'}; {'id': '196', 'type': 'argument_list', 'children': ['197', '200']}; {'id': '197', 'type': 'binary_operator', 'children': ['198', '199'], 'value': '%'}; {'id': '198', 'type': 'string', 'children': [], 'value': "'Mandatory %s value is missing'"}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '200', 'type': 'string', 'children': [], 'value': "'start_scan'"}; {'id': '201', 'type': 'return_statement', 'children': ['202']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'params'}
Processes the scan parameters.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '10']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'start_scan'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'targets'}; {'id': '7', 'type': 'default_parameter', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'parallel'}; {'id': '9', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '10', 'type': 'block', 'children': ['11', '17', '21', '29', '33', '47', '171', '211']}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'setsid'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '20', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28']}; {'id': '27', 'type': 'string', 'children': [], 'value': '"%s: Scan started."'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'target_list'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'targets'}; {'id': '33', 'type': 'if_statement', 'children': ['34', '40']}; {'id': '34', 'type': 'boolean_operator', 'children': ['35', '38'], 'value': 'or'}; {'id': '35', 'type': 'comparison_operator', 'children': ['36', '37'], 'value': 'is'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'target_list'}; {'id': '37', 'type': 'None', 'children': []}; {'id': '38', 'type': 'not_operator', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'target_list'}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'raise_statement', 'children': ['42']}; {'id': '42', 'type': 'call', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'OSPDError'}; {'id': '44', 'type': 'argument_list', 'children': ['45', '46']}; {'id': '45', 'type': 'string', 'children': [], 'value': "'Erroneous targets list'"}; {'id': '46', 'type': 'string', 'children': [], 'value': "'start_scan'"}; {'id': '47', 'type': 'for_statement', 'children': ['48', '51', '55']}; {'id': '48', 'type': 'pattern_list', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '51', 'type': 'call', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'target_list'}; {'id': '55', 'type': 'block', 'children': ['56', '98', '111', '124', '144', '155', '161']}; {'id': '56', 'type': 'while_statement', 'children': ['57', '63']}; {'id': '57', 'type': 'comparison_operator', 'children': ['58', '62'], 'value': '>='}; {'id': '58', 'type': 'call', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '60', 'type': 'argument_list', 'children': ['61']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'parallel'}; {'id': '63', 'type': 'block', 'children': ['64', '73', '81', '91']}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'progress'}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'calculate_progress'}; {'id': '71', 'type': 'argument_list', 'children': ['72']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'call', 'children': ['75', '78']}; {'id': '75', 'type': 'attribute', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'set_scan_progress'}; {'id': '78', 'type': 'argument_list', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'progress'}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'assignment', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '84', 'type': 'call', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'check_pending_target'}; {'id': '88', 'type': 'argument_list', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'sleep'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '98', 'type': 'if_statement', 'children': ['99', '109']}; {'id': '99', 'type': 'comparison_operator', 'children': ['100', '106'], 'value': '=='}; {'id': '100', 'type': 'call', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'get_scan_status'}; {'id': '104', 'type': 'argument_list', 'children': ['105']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'ScanStatus'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'STOPPED'}; {'id': '109', 'type': 'block', 'children': ['110']}; {'id': '110', 'type': 'return_statement', 'children': []}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'call', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '116', 'type': 'argument_list', 'children': ['117', '118', '121']}; {'id': '117', 'type': 'string', 'children': [], 'value': '"%s: Host scan started on ports %s."'}; {'id': '118', 'type': 'subscript', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '120', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '121', 'type': 'subscript', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '123', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'assignment', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'scan_process'}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'multiprocessing'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'Process'}; {'id': '131', 'type': 'argument_list', 'children': ['132', '137']}; {'id': '132', 'type': 'keyword_argument', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'parallel_scan'}; {'id': '137', 'type': 'keyword_argument', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '139', 'type': 'tuple', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '141', 'type': 'subscript', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '143', 'type': 'integer', 'children': [], 'value': '0'}; {'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': 'multiscan_proc'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '149', 'type': 'argument_list', 'children': ['150']}; {'id': '150', 'type': 'tuple', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'scan_process'}; {'id': '152', 'type': 'subscript', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'target'}; {'id': '154', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'scan_process'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '160', 'type': 'argument_list', 'children': []}; {'id': '161', 'type': 'expression_statement', 'children': ['162']}; {'id': '162', 'type': 'call', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'set_scan_status'}; {'id': '166', 'type': 'argument_list', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'ScanStatus'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'RUNNING'}; {'id': '171', 'type': 'while_statement', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '173', 'type': 'block', 'children': ['174', '184', '204']}; {'id': '174', 'type': 'expression_statement', 'children': ['175']}; {'id': '175', 'type': 'assignment', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'check_pending_target'}; {'id': '181', 'type': 'argument_list', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '184', 'type': 'if_statement', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'multiscan_proc'}; {'id': '186', 'type': 'block', 'children': ['187', '196']}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'progress'}; {'id': '190', 'type': 'call', 'children': ['191', '194']}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'calculate_progress'}; {'id': '194', 'type': 'argument_list', 'children': ['195']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '196', 'type': 'expression_statement', 'children': ['197']}; {'id': '197', 'type': 'call', 'children': ['198', '201']}; {'id': '198', 'type': 'attribute', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'set_scan_progress'}; {'id': '201', 'type': 'argument_list', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'progress'}; {'id': '204', 'type': 'expression_statement', 'children': ['205']}; {'id': '205', 'type': 'call', 'children': ['206', '209']}; {'id': '206', 'type': 'attribute', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'sleep'}; {'id': '209', 'type': 'argument_list', 'children': ['210']}; {'id': '210', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '211', 'type': 'if_statement', 'children': ['212', '222']}; {'id': '212', 'type': 'comparison_operator', 'children': ['213', '219'], 'value': '!='}; {'id': '213', 'type': 'call', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'get_scan_status'}; {'id': '217', 'type': 'argument_list', 'children': ['218']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'scan_id'}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'ScanStatus'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'STOPPED'}; {'id': '222', 'type': 'block', 'children': ['223']}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'finish_scan'}; {'id': '228', 'type': 'argument_list', 'children': ['229']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'scan_id'}
Handle N parallel scans if 'parallel' is greater than 1.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'create_args_parser'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '5', 'type': 'block', 'children': ['6', '17', '45', '174', '209', '236', '258', '277', '288', '307', '326', '344', '361', '374', '388', '401']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '9', 'type': 'call', 'children': ['10', '13']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'ArgumentParser'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'keyword_argument', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '17', 'type': 'function_definition', 'children': ['18', '19', '21']}; {'id': '18', 'type': 'function_name', 'children': [], 'value': 'network_port'}; {'id': '19', 'type': 'parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '21', 'type': 'block', 'children': ['22', '29', '43']}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '29', 'type': 'if_statement', 'children': ['30', '35']}; {'id': '30', 'type': 'not_operator', 'children': ['31']}; {'id': '31', 'type': 'comparison_operator', 'children': ['32', '33', '34'], 'value': '<'}; {'id': '32', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '34', 'type': 'integer', 'children': [], 'value': '65535'}; {'id': '35', 'type': 'block', 'children': ['36']}; {'id': '36', 'type': 'raise_statement', 'children': ['37']}; {'id': '37', 'type': 'call', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'string', 'children': [], 'value': "'port must be in ]0,65535] interval'"}; {'id': '43', 'type': 'return_statement', 'children': ['44']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '45', 'type': 'function_definition', 'children': ['46', '47', '49']}; {'id': '46', 'type': 'function_name', 'children': [], 'value': 'cacert_file'}; {'id': '47', 'type': 'parameters', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'cacert'}; {'id': '49', 'type': 'block', 'children': ['50', '78', '134', '153', '172']}; {'id': '50', 'type': 'try_statement', 'children': ['51', '63', '68']}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '55', 'type': 'call', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'create_default_context'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'keyword_argument', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'cacert'}; {'id': '63', 'type': 'except_clause', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'AttributeError'}; {'id': '65', 'type': 'block', 'children': ['66']}; {'id': '66', 'type': 'return_statement', 'children': ['67']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'cacert'}; {'id': '68', 'type': 'except_clause', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '70', 'type': 'block', 'children': ['71']}; {'id': '71', 'type': 'raise_statement', 'children': ['72']}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'string', 'children': [], 'value': "'CA Certificate not found'"}; {'id': '78', 'type': 'try_statement', 'children': ['79', '122']}; {'id': '79', 'type': 'block', 'children': ['80', '92', '101', '113']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'not_after'}; {'id': '83', 'type': 'subscript', 'children': ['84', '91']}; {'id': '84', 'type': 'subscript', 'children': ['85', '90']}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'get_ca_certs'}; {'id': '89', 'type': 'argument_list', 'children': []}; {'id': '90', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '91', 'type': 'string', 'children': [], 'value': "'notAfter'"}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'assignment', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'not_after'}; {'id': '95', 'type': 'call', 'children': ['96', '99']}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'cert_time_to_seconds'}; {'id': '99', 'type': 'argument_list', 'children': ['100']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'not_after'}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'assignment', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'not_before'}; {'id': '104', 'type': 'subscript', 'children': ['105', '112']}; {'id': '105', 'type': 'subscript', 'children': ['106', '111']}; {'id': '106', 'type': 'call', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'get_ca_certs'}; {'id': '110', 'type': 'argument_list', 'children': []}; {'id': '111', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '112', 'type': 'string', 'children': [], 'value': "'notBefore'"}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'not_before'}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'cert_time_to_seconds'}; {'id': '120', 'type': 'argument_list', 'children': ['121']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'not_before'}; {'id': '122', 'type': 'except_clause', 'children': ['123', '126']}; {'id': '123', 'type': 'tuple', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'IndexError'}; {'id': '126', 'type': 'block', 'children': ['127']}; {'id': '127', 'type': 'raise_statement', 'children': ['128']}; {'id': '128', 'type': 'call', 'children': ['129', '132']}; {'id': '129', 'type': 'attribute', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '132', 'type': 'argument_list', 'children': ['133']}; {'id': '133', 'type': 'string', 'children': [], 'value': "'CA Certificate is erroneous'"}; {'id': '134', 'type': 'if_statement', 'children': ['135', '145']}; {'id': '135', 'type': 'comparison_operator', 'children': ['136', '137'], 'value': '<'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'not_after'}; {'id': '137', 'type': 'call', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'call', 'children': ['141', '144']}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '144', 'type': 'argument_list', 'children': []}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'raise_statement', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '151']}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '151', 'type': 'argument_list', 'children': ['152']}; {'id': '152', 'type': 'string', 'children': [], 'value': "'CA Certificate expired'"}; {'id': '153', 'type': 'if_statement', 'children': ['154', '164']}; {'id': '154', 'type': 'comparison_operator', 'children': ['155', '156'], 'value': '>'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'not_before'}; {'id': '156', 'type': 'call', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '158', 'type': 'argument_list', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '163', 'type': 'argument_list', 'children': []}; {'id': '164', 'type': 'block', 'children': ['165']}; {'id': '165', 'type': 'raise_statement', 'children': ['166']}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '170', 'type': 'argument_list', 'children': ['171']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'CA Certificate not active yet'"}; {'id': '172', 'type': 'return_statement', 'children': ['173']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'cacert'}; {'id': '174', 'type': 'function_definition', 'children': ['175', '176', '178']}; {'id': '175', 'type': 'function_name', 'children': [], 'value': 'log_level'}; {'id': '176', 'type': 'parameters', 'children': ['177']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '178', 'type': 'block', 'children': ['179', '192', '207']}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '184', 'type': 'argument_list', 'children': ['185', '186', '191']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '186', 'type': 'call', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'upper'}; {'id': '190', 'type': 'argument_list', 'children': []}; {'id': '191', 'type': 'None', 'children': []}; {'id': '192', 'type': 'if_statement', 'children': ['193', '199']}; {'id': '193', 'type': 'not_operator', 'children': ['194']}; {'id': '194', 'type': 'call', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '196', 'type': 'argument_list', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '199', 'type': 'block', 'children': ['200']}; {'id': '200', 'type': 'raise_statement', 'children': ['201']}; {'id': '201', 'type': 'call', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '205', 'type': 'argument_list', 'children': ['206']}; {'id': '206', 'type': 'string', 'children': [], 'value': "'log level must be one of {debug,info,warning,error,critical}'"}; {'id': '207', 'type': 'return_statement', 'children': ['208']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '209', 'type': 'function_definition', 'children': ['210', '211', '213']}; {'id': '210', 'type': 'function_name', 'children': [], 'value': 'filename'}; {'id': '211', 'type': 'parameters', 'children': ['212']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '213', 'type': 'block', 'children': ['214', '234']}; {'id': '214', 'type': 'if_statement', 'children': ['215', '224']}; {'id': '215', 'type': 'not_operator', 'children': ['216']}; {'id': '216', 'type': 'call', 'children': ['217', '222']}; {'id': '217', 'type': 'attribute', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '222', 'type': 'argument_list', 'children': ['223']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '224', 'type': 'block', 'children': ['225']}; {'id': '225', 'type': 'raise_statement', 'children': ['226']}; {'id': '226', 'type': 'call', 'children': ['227', '230']}; {'id': '227', 'type': 'attribute', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'argparse'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'ArgumentTypeError'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'binary_operator', 'children': ['232', '233'], 'value': '%'}; {'id': '232', 'type': 'string', 'children': [], 'value': "'%s is not a valid file path'"}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '234', 'type': 'return_statement', 'children': ['235']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'string'}; {'id': '236', 'type': 'expression_statement', 'children': ['237']}; {'id': '237', 'type': 'call', 'children': ['238', '241']}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '241', 'type': 'argument_list', 'children': ['242', '243', '244', '247', '250']}; {'id': '242', 'type': 'string', 'children': [], 'value': "'-p'"}; {'id': '243', 'type': 'string', 'children': [], 'value': "'--port'"}; {'id': '244', 'type': 'keyword_argument', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'PORT'}; {'id': '247', 'type': 'keyword_argument', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'network_port'}; {'id': '250', 'type': 'keyword_argument', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '252', 'type': 'call', 'children': ['253', '256']}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'string', 'children': [], 'value': "'TCP Port to listen on. Default: {0}'"}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '256', 'type': 'argument_list', 'children': ['257']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'PORT'}; {'id': '258', 'type': 'expression_statement', 'children': ['259']}; {'id': '259', 'type': 'call', 'children': ['260', '263']}; {'id': '260', 'type': 'attribute', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '263', 'type': 'argument_list', 'children': ['264', '265', '266', '269']}; {'id': '264', 'type': 'string', 'children': [], 'value': "'-b'"}; {'id': '265', 'type': 'string', 'children': [], 'value': "'--bind-address'"}; {'id': '266', 'type': 'keyword_argument', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'ADDRESS'}; {'id': '269', 'type': 'keyword_argument', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '271', 'type': 'call', 'children': ['272', '275']}; {'id': '272', 'type': 'attribute', 'children': ['273', '274']}; {'id': '273', 'type': 'string', 'children': [], 'value': "'Address to listen on. Default: {0}'"}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'ADDRESS'}; {'id': '277', 'type': 'expression_statement', 'children': ['278']}; {'id': '278', 'type': 'call', 'children': ['279', '282']}; {'id': '279', 'type': 'attribute', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '282', 'type': 'argument_list', 'children': ['283', '284', '285']}; {'id': '283', 'type': 'string', 'children': [], 'value': "'-u'"}; {'id': '284', 'type': 'string', 'children': [], 'value': "'--unix-socket'"}; {'id': '285', 'type': 'keyword_argument', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '287', 'type': 'string', 'children': [], 'value': "'Unix file socket to listen on.'"}; {'id': '288', 'type': 'expression_statement', 'children': ['289']}; {'id': '289', 'type': 'call', 'children': ['290', '293']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '293', 'type': 'argument_list', 'children': ['294', '295', '296', '299']}; {'id': '294', 'type': 'string', 'children': [], 'value': "'-k'"}; {'id': '295', 'type': 'string', 'children': [], 'value': "'--key-file'"}; {'id': '296', 'type': 'keyword_argument', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '299', 'type': 'keyword_argument', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '301', 'type': 'call', 'children': ['302', '305']}; {'id': '302', 'type': 'attribute', 'children': ['303', '304']}; {'id': '303', 'type': 'string', 'children': [], 'value': "'Server key file. Default: {0}'"}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '305', 'type': 'argument_list', 'children': ['306']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'KEY_FILE'}; {'id': '307', 'type': 'expression_statement', 'children': ['308']}; {'id': '308', 'type': 'call', 'children': ['309', '312']}; {'id': '309', 'type': 'attribute', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '312', 'type': 'argument_list', 'children': ['313', '314', '315', '318']}; {'id': '313', 'type': 'string', 'children': [], 'value': "'-c'"}; {'id': '314', 'type': 'string', 'children': [], 'value': "'--cert-file'"}; {'id': '315', 'type': 'keyword_argument', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '318', 'type': 'keyword_argument', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '320', 'type': 'call', 'children': ['321', '324']}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'string', 'children': [], 'value': "'Server cert file. Default: {0}'"}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '324', 'type': 'argument_list', 'children': ['325']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'CERT_FILE'}; {'id': '326', 'type': 'expression_statement', 'children': ['327']}; {'id': '327', 'type': 'call', 'children': ['328', '331']}; {'id': '328', 'type': 'attribute', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '331', 'type': 'argument_list', 'children': ['332', '333', '336']}; {'id': '332', 'type': 'string', 'children': [], 'value': "'--ca-file'"}; {'id': '333', 'type': 'keyword_argument', 'children': ['334', '335']}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'cacert_file'}; {'id': '336', 'type': 'keyword_argument', 'children': ['337', '338']}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '338', 'type': 'call', 'children': ['339', '342']}; {'id': '339', 'type': 'attribute', 'children': ['340', '341']}; {'id': '340', 'type': 'string', 'children': [], 'value': "'CA cert file. Default: {0}'"}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '342', 'type': 'argument_list', 'children': ['343']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'CA_FILE'}; {'id': '344', 'type': 'expression_statement', 'children': ['345']}; {'id': '345', 'type': 'call', 'children': ['346', '349']}; {'id': '346', 'type': 'attribute', 'children': ['347', '348']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '349', 'type': 'argument_list', 'children': ['350', '351', '352', '355', '358']}; {'id': '350', 'type': 'string', 'children': [], 'value': "'-L'"}; {'id': '351', 'type': 'string', 'children': [], 'value': "'--log-level'"}; {'id': '352', 'type': 'keyword_argument', 'children': ['353', '354']}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '354', 'type': 'string', 'children': [], 'value': "'warning'"}; {'id': '355', 'type': 'keyword_argument', 'children': ['356', '357']}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'log_level'}; {'id': '358', 'type': 'keyword_argument', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '360', 'type': 'string', 'children': [], 'value': "'Wished level of logging. Default: WARNING'"}; {'id': '361', 'type': 'expression_statement', 'children': ['362']}; {'id': '362', 'type': 'call', 'children': ['363', '366']}; {'id': '363', 'type': 'attribute', 'children': ['364', '365']}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '366', 'type': 'argument_list', 'children': ['367', '368', '371']}; {'id': '367', 'type': 'string', 'children': [], 'value': "'--foreground'"}; {'id': '368', 'type': 'keyword_argument', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '370', 'type': 'string', 'children': [], 'value': "'store_true'"}; {'id': '371', 'type': 'keyword_argument', 'children': ['372', '373']}; {'id': '372', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '373', 'type': 'string', 'children': [], 'value': "'Run in foreground and logs all messages to console.'"}; {'id': '374', 'type': 'expression_statement', 'children': ['375']}; {'id': '375', 'type': 'call', 'children': ['376', '379']}; {'id': '376', 'type': 'attribute', 'children': ['377', '378']}; {'id': '377', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '379', 'type': 'argument_list', 'children': ['380', '381', '382', '385']}; {'id': '380', 'type': 'string', 'children': [], 'value': "'-l'"}; {'id': '381', 'type': 'string', 'children': [], 'value': "'--log-file'"}; {'id': '382', 'type': 'keyword_argument', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '385', 'type': 'keyword_argument', 'children': ['386', '387']}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '387', 'type': 'string', 'children': [], 'value': "'Path to the logging file.'"}; {'id': '388', 'type': 'expression_statement', 'children': ['389']}; {'id': '389', 'type': 'call', 'children': ['390', '393']}; {'id': '390', 'type': 'attribute', 'children': ['391', '392']}; {'id': '391', 'type': 'identifier', 'children': [], 'value': 'parser'}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '393', 'type': 'argument_list', 'children': ['394', '395', '398']}; {'id': '394', 'type': 'string', 'children': [], 'value': "'--version'"}; {'id': '395', 'type': 'keyword_argument', 'children': ['396', '397']}; {'id': '396', 'type': 'identifier', 'children': [], 'value': 'action'}; {'id': '397', 'type': 'string', 'children': [], 'value': "'store_true'"}; {'id': '398', 'type': 'keyword_argument', 'children': ['399', '400']}; {'id': '399', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '400', 'type': 'string', 'children': [], 'value': "'Print version then exit.'"}; {'id': '401', 'type': 'return_statement', 'children': ['402']}; {'id': '402', 'type': 'identifier', 'children': [], 'value': 'parser'}
Create a command-line arguments parser for OSPD.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '12']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_validate_range'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8', '9', '10', '11']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'min_ex'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '12', 'type': 'block', 'children': ['13', '33', '46', '94', '142', '190']}; {'id': '13', 'type': 'if_statement', 'children': ['14', '27']}; {'id': '14', 'type': 'boolean_operator', 'children': ['15', '21'], 'value': 'and'}; {'id': '15', 'type': 'not_operator', 'children': ['16']}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '18', 'type': 'argument_list', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'int'}; {'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', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'raise_statement', 'children': ['29']}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'CoreError'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'string', 'children': [], 'value': '"Value must be a integer type"'}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '38', 'type': 'argument_list', 'children': ['39', '40', '41', '42', '43', '44', '45']}; {'id': '39', 'type': 'string', 'children': [], 'value': 'u"Validate range : %s : %s : %s : %s : %s : %s"'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'min_ex'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '46', 'type': 'if_statement', 'children': ['47', '54']}; {'id': '47', 'type': 'boolean_operator', 'children': ['48', '51'], 'value': 'and'}; {'id': '48', 'type': 'comparison_operator', 'children': ['49', '50'], 'value': 'is'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '50', 'type': 'None', 'children': []}; {'id': '51', 'type': 'comparison_operator', 'children': ['52', '53'], 'value': '<'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '54', 'type': 'block', 'children': ['55']}; {'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': 'errors'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'call', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'SchemaError'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'SchemaErrorEntry'}; {'id': '67', 'type': 'argument_list', 'children': ['68', '71', '74', '88', '91']}; {'id': '68', 'type': 'keyword_argument', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '70', 'type': 'string', 'children': [], 'value': 'u"Type \'{prefix}\' has size of \'{value}\', greater than max limit \'{max_}\'. Path: \'{path}\'"'}; {'id': '71', 'type': 'keyword_argument', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '74', 'type': 'keyword_argument', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '76', 'type': 'conditional_expression', 'children': ['77', '81', '87'], 'value': 'if'}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'nativestr'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'subscript', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'tt'}; {'id': '84', 'type': 'string', 'children': [], 'value': "'str'"}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '88', 'type': 'keyword_argument', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '91', 'type': 'keyword_argument', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'max_'}; {'id': '94', 'type': 'if_statement', 'children': ['95', '102']}; {'id': '95', 'type': 'boolean_operator', 'children': ['96', '99'], 'value': 'and'}; {'id': '96', 'type': 'comparison_operator', 'children': ['97', '98'], 'value': 'is'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '98', 'type': 'None', 'children': []}; {'id': '99', 'type': 'comparison_operator', 'children': ['100', '101'], 'value': '>'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'call', 'children': ['105', '110']}; {'id': '105', 'type': 'attribute', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'errors'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '110', 'type': 'argument_list', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'SchemaError'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'SchemaErrorEntry'}; {'id': '115', 'type': 'argument_list', 'children': ['116', '119', '122', '136', '139']}; {'id': '116', 'type': 'keyword_argument', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '118', 'type': 'string', 'children': [], 'value': 'u"Type \'{prefix}\' has size of \'{value}\', less than min limit \'{min_}\'. Path: \'{path}\'"'}; {'id': '119', 'type': 'keyword_argument', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '122', 'type': 'keyword_argument', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '124', 'type': 'conditional_expression', 'children': ['125', '129', '135'], 'value': 'if'}; {'id': '125', 'type': 'call', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'nativestr'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '129', 'type': 'call', 'children': ['130', '133']}; {'id': '130', 'type': 'subscript', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'tt'}; {'id': '132', 'type': 'string', 'children': [], 'value': "'str'"}; {'id': '133', 'type': 'argument_list', 'children': ['134']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '136', 'type': 'keyword_argument', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '139', 'type': 'keyword_argument', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'min_'}; {'id': '142', 'type': 'if_statement', 'children': ['143', '150']}; {'id': '143', 'type': 'boolean_operator', 'children': ['144', '147'], 'value': 'and'}; {'id': '144', 'type': 'comparison_operator', 'children': ['145', '146'], 'value': 'is'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '146', 'type': 'None', 'children': []}; {'id': '147', 'type': 'comparison_operator', 'children': ['148', '149'], 'value': '<='}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '150', 'type': 'block', 'children': ['151']}; {'id': '151', 'type': 'expression_statement', 'children': ['152']}; {'id': '152', 'type': 'call', 'children': ['153', '158']}; {'id': '153', 'type': 'attribute', 'children': ['154', '157']}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'errors'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '158', 'type': 'argument_list', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'SchemaError'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'SchemaErrorEntry'}; {'id': '163', 'type': 'argument_list', 'children': ['164', '167', '170', '184', '187']}; {'id': '164', 'type': 'keyword_argument', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '166', 'type': 'string', 'children': [], 'value': 'u"Type \'{prefix}\' has size of \'{value}\', greater than or equals to max limit(exclusive) \'{max_ex}\'. Path: \'{path}\'"'}; {'id': '167', 'type': 'keyword_argument', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '170', 'type': 'keyword_argument', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '172', 'type': 'conditional_expression', 'children': ['173', '177', '183'], 'value': 'if'}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'nativestr'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'subscript', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'tt'}; {'id': '180', 'type': 'string', 'children': [], 'value': "'str'"}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '184', 'type': 'keyword_argument', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '187', 'type': 'keyword_argument', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'max_ex'}; {'id': '190', 'type': 'if_statement', 'children': ['191', '198']}; {'id': '191', 'type': 'boolean_operator', 'children': ['192', '195'], 'value': 'and'}; {'id': '192', 'type': 'comparison_operator', 'children': ['193', '194'], 'value': 'is'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'min_ex'}; {'id': '194', 'type': 'None', 'children': []}; {'id': '195', 'type': 'comparison_operator', 'children': ['196', '197'], 'value': '>='}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'min_ex'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '198', 'type': 'block', 'children': ['199']}; {'id': '199', 'type': 'expression_statement', 'children': ['200']}; {'id': '200', 'type': 'call', 'children': ['201', '206']}; {'id': '201', 'type': 'attribute', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'errors'}; {'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': 'identifier', 'children': [], 'value': 'SchemaError'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'SchemaErrorEntry'}; {'id': '211', 'type': 'argument_list', 'children': ['212', '215', '218', '232', '235']}; {'id': '212', 'type': 'keyword_argument', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '214', 'type': 'string', 'children': [], 'value': 'u"Type \'{prefix}\' has size of \'{value}\', less than or equals to min limit(exclusive) \'{min_ex}\'. Path: \'{path}\'"'}; {'id': '215', 'type': 'keyword_argument', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '218', 'type': 'keyword_argument', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '220', 'type': 'conditional_expression', 'children': ['221', '225', '231'], 'value': 'if'}; {'id': '221', 'type': 'call', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'nativestr'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '225', 'type': 'call', 'children': ['226', '229']}; {'id': '226', 'type': 'subscript', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'tt'}; {'id': '228', 'type': 'string', 'children': [], 'value': "'str'"}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '232', 'type': 'keyword_argument', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '235', 'type': 'keyword_argument', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'min_ex'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'min_ex'}
Validate that value is within range values.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_local_browser_class'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '23', '41']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'LOGGER'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '11', 'type': 'argument_list', 'children': ['12', '13']}; {'id': '12', 'type': 'string', 'children': [], 'value': 'u"Using local browser: %s [Default is firefox]"'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'browser_class'}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'BROWSERS'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '23', 'type': 'expression_statement', 'children': ['24']}; {'id': '24', 'type': 'assignment', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'headless'}; {'id': '26', 'type': 'comparison_operator', 'children': ['27', '40'], 'value': '=='}; {'id': '27', 'type': 'call', 'children': ['28', '39']}; {'id': '28', 'type': 'attribute', 'children': ['29', '38']}; {'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': 'os'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '35', 'type': 'argument_list', 'children': ['36', '37']}; {'id': '36', 'type': 'string', 'children': [], 'value': "'BOKCHOY_HEADLESS'"}; {'id': '37', 'type': 'string', 'children': [], 'value': "'false'"}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'lower'}; {'id': '39', 'type': 'argument_list', 'children': []}; {'id': '40', 'type': 'string', 'children': [], 'value': "'true'"}; {'id': '41', 'type': 'if_statement', 'children': ['42', '45', '73']}; {'id': '42', 'type': 'comparison_operator', 'children': ['43', '44'], 'value': 'is'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'browser_class'}; {'id': '44', 'type': 'None', 'children': []}; {'id': '45', 'type': 'block', 'children': ['46']}; {'id': '46', 'type': 'raise_statement', 'children': ['47']}; {'id': '47', 'type': 'call', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'BrowserConfigError'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'string', 'children': [], 'value': 'u"Invalid browser name {name}. Options are: {options}"'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '54', 'type': 'argument_list', 'children': ['55', '58']}; {'id': '55', 'type': 'keyword_argument', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '58', 'type': 'keyword_argument', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'options'}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'string', 'children': [], 'value': '", "'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'call', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'BROWSERS'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '72', 'type': 'argument_list', 'children': []}; {'id': '73', 'type': 'else_clause', 'children': ['74']}; {'id': '74', 'type': 'block', 'children': ['75', '288']}; {'id': '75', 'type': 'if_statement', 'children': ['76', '79', '233', '278']}; {'id': '76', 'type': 'comparison_operator', 'children': ['77', '78'], 'value': '=='}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '78', 'type': 'string', 'children': [], 'value': "'firefox'"}; {'id': '79', 'type': 'block', 'children': ['80', '96', '113', '119', '127', '136', '140', '152', '163', '174']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'log_path'}; {'id': '83', 'type': 'call', 'children': ['84', '89']}; {'id': '84', 'type': 'attribute', 'children': ['85', '88']}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '89', 'type': 'argument_list', 'children': ['90', '95']}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'getcwd'}; {'id': '94', 'type': 'argument_list', 'children': []}; {'id': '95', 'type': 'string', 'children': [], 'value': "'geckodriver.log'"}; {'id': '96', 'type': 'if_statement', 'children': ['97', '105']}; {'id': '97', 'type': 'call', 'children': ['98', '103']}; {'id': '98', 'type': 'attribute', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'exists'}; {'id': '103', 'type': 'argument_list', 'children': ['104']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'log_path'}; {'id': '105', 'type': 'block', 'children': ['106']}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'remove'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'log_path'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'firefox_options'}; {'id': '116', 'type': 'call', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'FirefoxOptions'}; {'id': '118', 'type': 'argument_list', 'children': []}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '126']}; {'id': '121', 'type': 'attribute', 'children': ['122', '125']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'firefox_options'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '126', 'type': 'string', 'children': [], 'value': "'trace'"}; {'id': '127', 'type': 'if_statement', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'headless'}; {'id': '129', 'type': 'block', 'children': ['130']}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'firefox_options'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'headless'}; {'id': '135', 'type': 'True', 'children': []}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'browser_args'}; {'id': '139', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '140', 'type': 'expression_statement', 'children': ['141']}; {'id': '141', 'type': 'assignment', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '143', 'type': 'dictionary', 'children': ['144', '149']}; {'id': '144', 'type': 'pair', 'children': ['145', '146']}; {'id': '145', 'type': 'string', 'children': [], 'value': "'firefox_profile'"}; {'id': '146', 'type': 'call', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': '_firefox_profile'}; {'id': '148', 'type': 'argument_list', 'children': []}; {'id': '149', 'type': 'pair', 'children': ['150', '151']}; {'id': '150', 'type': 'string', 'children': [], 'value': "'options'"}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'firefox_options'}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '155', 'type': 'call', 'children': ['156', '161']}; {'id': '156', 'type': 'attribute', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'string', 'children': [], 'value': "'SELENIUM_FIREFOX_PATH'"}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'assignment', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'firefox_log'}; {'id': '166', 'type': 'call', 'children': ['167', '172']}; {'id': '167', 'type': 'attribute', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'environ'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '172', 'type': 'argument_list', 'children': ['173']}; {'id': '173', 'type': 'string', 'children': [], 'value': "'SELENIUM_FIREFOX_LOG'"}; {'id': '174', 'type': 'if_statement', 'children': ['175', '178', '197', '215']}; {'id': '175', 'type': 'boolean_operator', 'children': ['176', '177'], 'value': 'and'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'firefox_log'}; {'id': '178', 'type': 'block', 'children': ['179']}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'call', 'children': ['181', '184']}; {'id': '181', 'type': 'attribute', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'dictionary', 'children': ['186']}; {'id': '186', 'type': 'pair', 'children': ['187', '188']}; {'id': '187', 'type': 'string', 'children': [], 'value': "'firefox_binary'"}; {'id': '188', 'type': 'call', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'FirefoxBinary'}; {'id': '190', 'type': 'argument_list', 'children': ['191', '194']}; {'id': '191', 'type': 'keyword_argument', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '194', 'type': 'keyword_argument', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'log_file'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'firefox_log'}; {'id': '197', 'type': 'elif_clause', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '199', 'type': 'block', 'children': ['200']}; {'id': '200', 'type': 'expression_statement', 'children': ['201']}; {'id': '201', 'type': 'call', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '205', 'type': 'argument_list', 'children': ['206']}; {'id': '206', 'type': 'dictionary', 'children': ['207']}; {'id': '207', 'type': 'pair', 'children': ['208', '209']}; {'id': '208', 'type': 'string', 'children': [], 'value': "'firefox_binary'"}; {'id': '209', 'type': 'call', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'FirefoxBinary'}; {'id': '211', 'type': 'argument_list', 'children': ['212']}; {'id': '212', 'type': 'keyword_argument', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'firefox_path'}; {'id': '215', 'type': 'elif_clause', 'children': ['216', '217']}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'firefox_log'}; {'id': '217', 'type': 'block', 'children': ['218']}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'call', 'children': ['220', '223']}; {'id': '220', 'type': 'attribute', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'dictionary', 'children': ['225']}; {'id': '225', 'type': 'pair', 'children': ['226', '227']}; {'id': '226', 'type': 'string', 'children': [], 'value': "'firefox_binary'"}; {'id': '227', 'type': 'call', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'FirefoxBinary'}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'keyword_argument', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'log_file'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'firefox_log'}; {'id': '233', 'type': 'elif_clause', 'children': ['234', '237']}; {'id': '234', 'type': 'comparison_operator', 'children': ['235', '236'], 'value': '=='}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'browser_name'}; {'id': '236', 'type': 'string', 'children': [], 'value': "'chrome'"}; {'id': '237', 'type': 'block', 'children': ['238', '244', '253', '260', '267', '271']}; {'id': '238', 'type': 'expression_statement', 'children': ['239']}; {'id': '239', 'type': 'assignment', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'chrome_options'}; {'id': '241', 'type': 'call', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'ChromeOptions'}; {'id': '243', 'type': 'argument_list', 'children': []}; {'id': '244', 'type': 'if_statement', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'headless'}; {'id': '246', 'type': 'block', 'children': ['247']}; {'id': '247', 'type': 'expression_statement', 'children': ['248']}; {'id': '248', 'type': 'assignment', 'children': ['249', '252']}; {'id': '249', 'type': 'attribute', 'children': ['250', '251']}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'chrome_options'}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'headless'}; {'id': '252', 'type': 'True', 'children': []}; {'id': '253', 'type': 'expression_statement', 'children': ['254']}; {'id': '254', 'type': 'call', 'children': ['255', '258']}; {'id': '255', 'type': 'attribute', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'chrome_options'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '258', 'type': 'argument_list', 'children': ['259']}; {'id': '259', 'type': 'string', 'children': [], 'value': "'--use-fake-device-for-media-stream'"}; {'id': '260', 'type': 'expression_statement', 'children': ['261']}; {'id': '261', 'type': 'call', 'children': ['262', '265']}; {'id': '262', 'type': 'attribute', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'chrome_options'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'add_argument'}; {'id': '265', 'type': 'argument_list', 'children': ['266']}; {'id': '266', 'type': 'string', 'children': [], 'value': "'--use-fake-ui-for-media-stream'"}; {'id': '267', 'type': 'expression_statement', 'children': ['268']}; {'id': '268', 'type': 'assignment', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'browser_args'}; {'id': '270', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '271', 'type': 'expression_statement', 'children': ['272']}; {'id': '272', 'type': 'assignment', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '274', 'type': 'dictionary', 'children': ['275']}; {'id': '275', 'type': 'pair', 'children': ['276', '277']}; {'id': '276', 'type': 'string', 'children': [], 'value': "'options'"}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'chrome_options'}; {'id': '278', 'type': 'else_clause', 'children': ['279']}; {'id': '279', 'type': 'block', 'children': ['280']}; {'id': '280', 'type': 'expression_statement', 'children': ['281']}; {'id': '281', 'type': 'assignment', 'children': ['282', '285']}; {'id': '282', 'type': 'pattern_list', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'browser_args'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}; {'id': '285', 'type': 'expression_list', 'children': ['286', '287']}; {'id': '286', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '287', 'type': 'dictionary', 'children': []}; {'id': '288', 'type': 'return_statement', 'children': ['289']}; {'id': '289', 'type': 'expression_list', 'children': ['290', '291', '292']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'browser_class'}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'browser_args'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'browser_kwargs'}
Returns class, kwargs, and args needed to instantiate the local browser.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_run_pass'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '173']}; {'id': '6', 'type': 'while_statement', 'children': ['7', '8']}; {'id': '7', 'type': 'True', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '43', '52', '101', '111', '142', '152']}; {'id': '9', 'type': 'try_statement', 'children': ['10', '22']}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'expression_statement', 'children': ['12']}; {'id': '12', 'type': 'assignment', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '14', 'type': 'call', 'children': ['15', '20']}; {'id': '15', 'type': 'attribute', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_file'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'read'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'integer', 'children': [], 'value': '4096'}; {'id': '22', 'type': 'except_clause', 'children': ['23', '24', '25']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'if_statement', 'children': ['27', '34']}; {'id': '27', 'type': 'comparison_operator', 'children': ['28', '31'], 'value': '=='}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'errno'}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'errno'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'ESTALE'}; {'id': '34', 'type': 'block', 'children': ['35', '41']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'active'}; {'id': '40', 'type': 'False', 'children': []}; {'id': '41', 'type': 'return_statement', 'children': ['42']}; {'id': '42', 'type': 'False', 'children': []}; {'id': '43', 'type': 'expression_statement', 'children': ['44']}; {'id': '44', 'type': 'assignment', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': '_buffer_extract'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '52', 'type': 'if_statement', 'children': ['53', '55']}; {'id': '53', 'type': 'not_operator', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '55', 'type': 'block', 'children': ['56', '100']}; {'id': '56', 'type': 'if_statement', 'children': ['57', '72']}; {'id': '57', 'type': 'boolean_operator', 'children': ['58', '61'], 'value': 'and'}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': '_current_event'}; {'id': '61', 'type': 'comparison_operator', 'children': ['62', '71'], 'value': '>'}; {'id': '62', 'type': 'binary_operator', 'children': ['63', '68'], 'value': '-'}; {'id': '63', 'type': 'call', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '67', 'type': 'argument_list', 'children': []}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': '_last_activity'}; {'id': '71', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '72', 'type': 'block', 'children': ['73', '84', '92']}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': '_current_event'}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'call', 'children': ['86', '91']}; {'id': '86', 'type': 'attribute', 'children': ['87', '90']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': '_current_event'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'clear'}; {'id': '91', 'type': 'argument_list', 'children': []}; {'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': 'self'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': '_callback_wrapper'}; {'id': '97', 'type': 'argument_list', 'children': ['98']}; {'id': '98', 'type': 'list', 'children': ['99'], 'value': '[event]'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '100', 'type': 'break_statement', 'children': []}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'assignment', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': '_last_activity'}; {'id': '106', 'type': 'call', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '110', 'type': 'argument_list', 'children': []}; {'id': '111', 'type': 'if_statement', 'children': ['112', '119', '136']}; {'id': '112', 'type': 'boolean_operator', 'children': ['113', '116'], 'value': 'or'}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': '_multiline_regex_after'}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': '_multiline_regex_before'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '123', 'type': 'call', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'multiline_merge'}; {'id': '125', 'type': 'argument_list', 'children': ['126', '127', '130', '133']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': '_current_event'}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': '_multiline_regex_after'}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': '_multiline_regex_before'}; {'id': '136', 'type': 'else_clause', 'children': ['137']}; {'id': '137', 'type': 'block', 'children': ['138']}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '142', 'type': 'if_statement', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '144', 'type': 'block', 'children': ['145']}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'call', 'children': ['147', '150']}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': '_callback_wrapper'}; {'id': '150', 'type': 'argument_list', 'children': ['151']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '152', 'type': 'if_statement', 'children': ['153', '156']}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': '_sincedb_path'}; {'id': '156', 'type': 'block', 'children': ['157', '164']}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'current_line_count'}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'call', 'children': ['166', '169']}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': '_sincedb_update_position'}; {'id': '169', 'type': 'argument_list', 'children': ['170']}; {'id': '170', 'type': 'keyword_argument', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'lines'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'current_line_count'}; {'id': '173', 'type': 'expression_statement', 'children': ['174']}; {'id': '174', 'type': 'call', 'children': ['175', '178']}; {'id': '175', 'type': 'attribute', 'children': ['176', '177']}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': '_sincedb_update_position'}; {'id': '178', 'type': 'argument_list', 'children': []}
Read lines from a file and performs a callback against them
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'multi_index_df_to_component_dfs'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'rid'}; {'id': '7', 'type': 'string', 'children': [], 'value': '"rid"'}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'cid'}; {'id': '10', 'type': 'string', 'children': [], 'value': '"cid"'}; {'id': '11', 'type': 'block', 'children': ['12', '26', '40', '128', '216', '249', '282', '315']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'rids'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'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': 'multi_index_df'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'get_level_values'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'rid'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'cids'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'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': 'multi_index_df'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'get_level_values'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'cid'}; {'id': '40', 'type': 'if_statement', 'children': ['41', '50', '118']}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'MultiIndex'}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'if_statement', 'children': ['52', '62', '108']}; {'id': '52', 'type': 'comparison_operator', 'children': ['53', '61'], 'value': '>'}; {'id': '53', 'type': 'call', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'attribute', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '61', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '62', 'type': 'block', 'children': ['63', '74', '83']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'mi_df_index'}; {'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': 'multi_index_df'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'droplevel'}; {'id': '72', 'type': 'argument_list', 'children': ['73']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'rid'}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'assignment', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'rhds'}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'mi_df_index'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'row_metadata'}; {'id': '86', 'type': 'attribute', 'children': ['87', '107']}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'list_comprehension', 'children': ['93', '101']}; {'id': '93', 'type': 'attribute', 'children': ['94', '100']}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'mi_df_index'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'get_level_values'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '101', 'type': 'for_in_clause', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '103', 'type': 'call', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'rhds'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'T'}; {'id': '108', 'type': 'else_clause', 'children': ['109']}; {'id': '109', 'type': 'block', 'children': ['110', '114']}; {'id': '110', 'type': 'expression_statement', 'children': ['111']}; {'id': '111', 'type': 'assignment', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'rhds'}; {'id': '113', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'assignment', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'row_metadata'}; {'id': '117', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '118', 'type': 'else_clause', 'children': ['119']}; {'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': 'rhds'}; {'id': '123', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'assignment', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'row_metadata'}; {'id': '127', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '128', 'type': 'if_statement', 'children': ['129', '138', '206']}; {'id': '129', 'type': 'call', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '131', 'type': 'argument_list', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '135', 'type': 'attribute', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'MultiIndex'}; {'id': '138', 'type': 'block', 'children': ['139']}; {'id': '139', 'type': 'if_statement', 'children': ['140', '150', '196']}; {'id': '140', 'type': 'comparison_operator', 'children': ['141', '149'], 'value': '>'}; {'id': '141', 'type': 'call', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'attribute', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '149', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '150', 'type': 'block', 'children': ['151', '162', '171']}; {'id': '151', 'type': 'expression_statement', 'children': ['152']}; {'id': '152', 'type': 'assignment', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'mi_df_columns'}; {'id': '154', 'type': 'call', 'children': ['155', '160']}; {'id': '155', 'type': 'attribute', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'droplevel'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'cid'}; {'id': '162', 'type': 'expression_statement', 'children': ['163']}; {'id': '163', 'type': 'assignment', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'chds'}; {'id': '165', 'type': 'call', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '167', 'type': 'argument_list', 'children': ['168']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'mi_df_columns'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'assignment', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'col_metadata'}; {'id': '174', 'type': 'attribute', 'children': ['175', '195']}; {'id': '175', 'type': 'call', 'children': ['176', '179']}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'array'}; {'id': '179', 'type': 'argument_list', 'children': ['180']}; {'id': '180', 'type': 'list_comprehension', 'children': ['181', '189']}; {'id': '181', 'type': 'attribute', 'children': ['182', '188']}; {'id': '182', 'type': 'call', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'mi_df_columns'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'get_level_values'}; {'id': '186', 'type': 'argument_list', 'children': ['187']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '189', 'type': 'for_in_clause', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'level'}; {'id': '191', 'type': 'call', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '193', 'type': 'argument_list', 'children': ['194']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'chds'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'T'}; {'id': '196', 'type': 'else_clause', 'children': ['197']}; {'id': '197', 'type': 'block', 'children': ['198', '202']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'chds'}; {'id': '201', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'assignment', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'col_metadata'}; {'id': '205', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '206', 'type': 'else_clause', 'children': ['207']}; {'id': '207', 'type': 'block', 'children': ['208', '212']}; {'id': '208', 'type': 'expression_statement', 'children': ['209']}; {'id': '209', 'type': 'assignment', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'chds'}; {'id': '211', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'col_metadata'}; {'id': '215', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'assignment', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'row_metadata_df'}; {'id': '219', 'type': 'call', 'children': ['220', '225']}; {'id': '220', 'type': 'attribute', 'children': ['221', '224']}; {'id': '221', 'type': 'attribute', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'DataFrame'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'from_records'}; {'id': '225', 'type': 'argument_list', 'children': ['226', '227', '238']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'row_metadata'}; {'id': '227', 'type': 'keyword_argument', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '229', 'type': 'call', 'children': ['230', '233']}; {'id': '230', 'type': 'attribute', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '233', 'type': 'argument_list', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'rids'}; {'id': '235', 'type': 'keyword_argument', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '237', 'type': 'string', 'children': [], 'value': '"rid"'}; {'id': '238', 'type': 'keyword_argument', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '240', 'type': 'call', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '244', 'type': 'argument_list', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'rhds'}; {'id': '246', 'type': 'keyword_argument', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '248', 'type': 'string', 'children': [], 'value': '"rhd"'}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'col_metadata_df'}; {'id': '252', 'type': 'call', 'children': ['253', '258']}; {'id': '253', 'type': 'attribute', 'children': ['254', '257']}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'DataFrame'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'from_records'}; {'id': '258', 'type': 'argument_list', 'children': ['259', '260', '271']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'col_metadata'}; {'id': '260', 'type': 'keyword_argument', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '262', 'type': 'call', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '266', 'type': 'argument_list', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'cids'}; {'id': '268', 'type': 'keyword_argument', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '270', 'type': 'string', 'children': [], 'value': '"cid"'}; {'id': '271', 'type': 'keyword_argument', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '273', 'type': 'call', 'children': ['274', '277']}; {'id': '274', 'type': 'attribute', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '277', 'type': 'argument_list', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'chds'}; {'id': '279', 'type': 'keyword_argument', 'children': ['280', '281']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '281', 'type': 'string', 'children': [], 'value': '"chd"'}; {'id': '282', 'type': 'expression_statement', 'children': ['283']}; {'id': '283', 'type': 'assignment', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'data_df'}; {'id': '285', 'type': 'call', 'children': ['286', '289']}; {'id': '286', 'type': 'attribute', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'DataFrame'}; {'id': '289', 'type': 'argument_list', 'children': ['290', '293', '304']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'multi_index_df'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '293', 'type': 'keyword_argument', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '295', 'type': 'call', 'children': ['296', '299']}; {'id': '296', 'type': 'attribute', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '299', 'type': 'argument_list', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'rids'}; {'id': '301', 'type': 'keyword_argument', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '303', 'type': 'string', 'children': [], 'value': '"rid"'}; {'id': '304', 'type': 'keyword_argument', 'children': ['305', '306']}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'columns'}; {'id': '306', 'type': 'call', 'children': ['307', '310']}; {'id': '307', 'type': 'attribute', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'pd'}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'Index'}; {'id': '310', 'type': 'argument_list', 'children': ['311', '312']}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'cids'}; {'id': '312', 'type': 'keyword_argument', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '314', 'type': 'string', 'children': [], 'value': '"cid"'}; {'id': '315', 'type': 'return_statement', 'children': ['316']}; {'id': '316', 'type': 'expression_list', 'children': ['317', '318', '319']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'data_df'}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'row_metadata_df'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'col_metadata_df'}
Convert a multi-index df into 3 component dfs.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'send_ready_for_review'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'release_name'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'release_number'}; {'id': '7', 'type': 'block', 'children': ['8', '21', '40', '49', '63', '86', '98', '117', '121', '152', '175', '185', '191', '210']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '11', 'type': 'call', 'children': ['12', '19']}; {'id': '12', 'type': 'attribute', 'children': ['13', '18']}; {'id': '13', 'type': 'attribute', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'Build'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '21', 'type': 'if_statement', 'children': ['22', '26']}; {'id': '22', 'type': 'not_operator', 'children': ['23']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'send_email'}; {'id': '26', 'type': 'block', 'children': ['27', '39']}; {'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': 'logging'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '32', 'type': 'argument_list', 'children': ['33', '36']}; {'id': '33', 'type': 'concatenated_string', 'children': ['34', '35']}; {'id': '34', 'type': 'string', 'children': [], 'value': "'Not sending ready for review email because build does not have '"}; {'id': '35', 'type': 'string', 'children': [], 'value': "'email enabled. build_id=%r'"}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '39', 'type': 'return_statement', 'children': []}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'ops'}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'operations'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'BuildOps'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '56']}; {'id': '51', 'type': 'pattern_list', 'children': ['52', '53', '54', '55']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'run_list'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'stats_dict'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'ops'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'get_release'}; {'id': '60', 'type': 'argument_list', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'release_name'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'release_number'}; {'id': '63', 'type': 'if_statement', 'children': ['64', '66']}; {'id': '64', 'type': 'not_operator', 'children': ['65']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'run_list'}; {'id': '66', 'type': 'block', 'children': ['67', '85']}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '72', 'type': 'argument_list', 'children': ['73', '76', '79', '82']}; {'id': '73', 'type': 'concatenated_string', 'children': ['74', '75']}; {'id': '74', 'type': 'string', 'children': [], 'value': "'Not sending ready for review email because there are '"}; {'id': '75', 'type': 'string', 'children': [], 'value': "' no runs. build_id=%r, release_name=%r, release_number=%d'"}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '85', 'type': 'return_statement', 'children': []}; {'id': '86', 'type': 'expression_statement', 'children': ['87']}; {'id': '87', 'type': 'assignment', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '89', 'type': 'binary_operator', 'children': ['90', '91'], 'value': '%'}; {'id': '90', 'type': 'string', 'children': [], 'value': "'%s: %s - Ready for review'"}; {'id': '91', 'type': 'tuple', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'email_body'}; {'id': '101', 'type': 'call', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'render_template'}; {'id': '103', 'type': 'argument_list', 'children': ['104', '105', '108', '111', '114']}; {'id': '104', 'type': 'string', 'children': [], 'value': "'email_ready_for_review.html'"}; {'id': '105', 'type': 'keyword_argument', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '108', 'type': 'keyword_argument', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '111', 'type': 'keyword_argument', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'run_list'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'run_list'}; {'id': '114', 'type': 'keyword_argument', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'stats_dict'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'stats_dict'}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'assignment', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '120', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '121', 'type': 'if_statement', 'children': ['122', '125', '135']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'email_alias'}; {'id': '125', 'type': 'block', 'children': ['126']}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'email_alias'}; {'id': '135', 'type': 'else_clause', 'children': ['136']}; {'id': '136', 'type': 'block', 'children': ['137']}; {'id': '137', 'type': 'for_statement', 'children': ['138', '139', '142']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'owners'}; {'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': 'recipients'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'email_address'}; {'id': '152', 'type': 'if_statement', 'children': ['153', '155']}; {'id': '153', 'type': 'not_operator', 'children': ['154']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '155', 'type': 'block', 'children': ['156', '174']}; {'id': '156', 'type': 'expression_statement', 'children': ['157']}; {'id': '157', 'type': 'call', 'children': ['158', '161']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '161', 'type': 'argument_list', 'children': ['162', '165', '168', '171']}; {'id': '162', 'type': 'concatenated_string', 'children': ['163', '164']}; {'id': '163', 'type': 'string', 'children': [], 'value': "'Not sending ready for review email because there are no '"}; {'id': '164', 'type': 'string', 'children': [], 'value': "'recipients. build_id=%r, release_name=%r, release_number=%d'"}; {'id': '165', 'type': 'attribute', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '174', 'type': 'return_statement', 'children': []}; {'id': '175', 'type': 'expression_statement', 'children': ['176']}; {'id': '176', 'type': 'assignment', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '178', 'type': 'call', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'Message'}; {'id': '180', 'type': 'argument_list', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '182', 'type': 'keyword_argument', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'assignment', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'html'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'email_body'}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'call', 'children': ['193', '196']}; {'id': '193', 'type': 'attribute', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '196', 'type': 'argument_list', 'children': ['197', '200', '203', '206', '209']}; {'id': '197', 'type': 'concatenated_string', 'children': ['198', '199']}; {'id': '198', 'type': 'string', 'children': [], 'value': "'Sending ready for review email for build_id=%r, '"}; {'id': '199', 'type': 'string', 'children': [], 'value': "'release_name=%r, release_number=%d to %r'"}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '206', 'type': 'attribute', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'recipients'}; {'id': '210', 'type': 'return_statement', 'children': ['211']}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'render_or_send'}; {'id': '213', 'type': 'argument_list', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'send_ready_for_review'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'message'}
Sends an email indicating that the release is ready for review.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'claim_invitations'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '5', 'type': 'block', 'children': ['6', '20', '33']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'invitation_user_id'}; {'id': '9', 'type': 'binary_operator', 'children': ['10', '11'], 'value': '%'}; {'id': '10', 'type': 'string', 'children': [], 'value': "'%s:%s'"}; {'id': '11', 'type': 'tuple', 'children': ['12', '17']}; {'id': '12', 'type': 'attribute', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'User'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'EMAIL_INVITATION'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'email_address'}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'invitation_user'}; {'id': '23', 'type': 'call', 'children': ['24', '31']}; {'id': '24', 'type': 'attribute', 'children': ['25', '30']}; {'id': '25', 'type': 'attribute', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'User'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'invitation_user_id'}; {'id': '33', 'type': 'if_statement', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'invitation_user'}; {'id': '35', 'type': 'block', 'children': ['36', '45', '50', '59', '72', '149', '158', '166']}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'invited_build_list'}; {'id': '39', 'type': 'call', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'invitation_user'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'builds'}; {'id': '45', 'type': 'if_statement', 'children': ['46', '48']}; {'id': '46', 'type': 'not_operator', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'invited_build_list'}; {'id': '48', 'type': 'block', 'children': ['49']}; {'id': '49', 'type': 'return_statement', 'children': []}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'call', 'children': ['52', '57']}; {'id': '52', 'type': 'attribute', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '57', 'type': 'argument_list', 'children': ['58']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '64', 'type': 'argument_list', 'children': ['65', '66', '70', '71']}; {'id': '65', 'type': 'string', 'children': [], 'value': "'Found %d build admin invitations for id=%r, user=%r'"}; {'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': 'invited_build_list'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'invitation_user_id'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '72', 'type': 'for_statement', 'children': ['73', '74', '75']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'invited_build_list'}; {'id': '75', 'type': 'block', 'children': ['76', '85', '140']}; {'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': 'build'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'owners'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'remove'}; {'id': '83', 'type': 'argument_list', 'children': ['84']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'invitation_user'}; {'id': '85', 'type': 'if_statement', 'children': ['86', '95', '123']}; {'id': '86', 'type': 'not_operator', 'children': ['87']}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'is_owned_by'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '95', 'type': 'block', 'children': ['96', '105', '115']}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '103']}; {'id': '98', 'type': 'attribute', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'owners'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '103', 'type': 'argument_list', 'children': ['104']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '105', 'type': 'expression_statement', 'children': ['106']}; {'id': '106', 'type': 'call', 'children': ['107', '110']}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '110', 'type': 'argument_list', 'children': ['111', '112']}; {'id': '111', 'type': 'string', 'children': [], 'value': "'Claiming invitation for build_id=%r'"}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'build'}; {'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': 'save_admin_log'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '120', 'type': 'keyword_argument', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'invite_accepted'}; {'id': '122', 'type': 'True', 'children': []}; {'id': '123', 'type': 'else_clause', 'children': ['124']}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'call', 'children': ['127', '130']}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '130', 'type': 'argument_list', 'children': ['131', '134', '137']}; {'id': '131', 'type': 'concatenated_string', 'children': ['132', '133']}; {'id': '132', 'type': 'string', 'children': [], 'value': "'User already owner of build. '"}; {'id': '133', 'type': 'string', 'children': [], 'value': "'id=%r, build_id=%r'"}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '140', 'type': 'expression_statement', 'children': ['141']}; {'id': '141', 'type': 'call', 'children': ['142', '147']}; {'id': '142', 'type': 'attribute', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '147', 'type': 'argument_list', 'children': ['148']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'call', 'children': ['151', '156']}; {'id': '151', 'type': 'attribute', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'delete'}; {'id': '156', 'type': 'argument_list', 'children': ['157']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'invitation_user'}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '165']}; {'id': '160', 'type': 'attribute', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'commit'}; {'id': '165', 'type': 'argument_list', 'children': []}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'call', 'children': ['168', '173']}; {'id': '168', 'type': 'attribute', 'children': ['169', '172']}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'current_user'}
Claims any pending invitations for the given user's email address.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_check_release_done_processing'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '5', 'type': 'block', 'children': ['6', '37', '54', '95', '113', '119', '125', '131', '150', '160', '169']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '16']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '11'], 'value': '!='}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '11', 'type': 'attribute', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'Release'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'PROCESSING'}; {'id': '16', 'type': 'block', 'children': ['17', '35']}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '22', 'type': 'argument_list', 'children': ['23', '26', '29', '32']}; {'id': '23', 'type': 'concatenated_string', 'children': ['24', '25']}; {'id': '24', 'type': 'string', 'children': [], 'value': "'Release not in processing state yet: build_id=%r, '"}; {'id': '25', 'type': 'string', 'children': [], 'value': "'name=%r, number=%d'"}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '35', 'type': 'return_statement', 'children': ['36']}; {'id': '36', 'type': 'False', 'children': []}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '40', 'type': 'call', 'children': ['41', '48']}; {'id': '41', 'type': 'attribute', 'children': ['42', '47']}; {'id': '42', 'type': 'attribute', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'Run'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'filter_by'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'keyword_argument', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'release_id'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '54', 'type': 'for_statement', 'children': ['55', '56', '57']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '57', 'type': 'block', 'children': ['58', '71', '83']}; {'id': '58', 'type': 'if_statement', 'children': ['59', '68']}; {'id': '59', 'type': 'comparison_operator', 'children': ['60', '63'], 'value': '=='}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '63', 'type': 'attribute', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'Run'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'NEEDS_DIFF'}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'return_statement', 'children': ['70']}; {'id': '70', 'type': 'False', 'children': []}; {'id': '71', 'type': 'if_statement', 'children': ['72', '80']}; {'id': '72', 'type': 'boolean_operator', 'children': ['73', '76'], 'value': 'and'}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'ref_config'}; {'id': '76', 'type': 'not_operator', 'children': ['77']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'ref_image'}; {'id': '80', 'type': 'block', 'children': ['81']}; {'id': '81', 'type': 'return_statement', 'children': ['82']}; {'id': '82', 'type': 'False', 'children': []}; {'id': '83', 'type': 'if_statement', 'children': ['84', '92']}; {'id': '84', 'type': 'boolean_operator', 'children': ['85', '88'], 'value': 'and'}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'config'}; {'id': '88', 'type': 'not_operator', 'children': ['89']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'return_statement', 'children': ['94']}; {'id': '94', 'type': 'False', 'children': []}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'call', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '100', 'type': 'argument_list', 'children': ['101', '104', '107', '110']}; {'id': '101', 'type': 'concatenated_string', 'children': ['102', '103']}; {'id': '102', 'type': 'string', 'children': [], 'value': "'Release done processing, now reviewing: build_id=%r, '"}; {'id': '103', 'type': 'string', 'children': [], 'value': "'name=%r, number=%d'"}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '110', 'type': 'attribute', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'release_name'}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'assignment', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'release_number'}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'number'}; {'id': '131', 'type': 'decorated_definition', 'children': ['132', '136']}; {'id': '132', 'type': 'decorator', 'children': ['133']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'after_this_request'}; {'id': '136', 'type': 'function_definition', 'children': ['137', '138', '140']}; {'id': '137', 'type': 'function_name', 'children': [], 'value': 'send_notification_email'}; {'id': '138', 'type': 'parameters', 'children': ['139']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '140', 'type': 'block', 'children': ['141']}; {'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': 'emails'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'send_ready_for_review'}; {'id': '146', 'type': 'argument_list', 'children': ['147', '148', '149']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'release_name'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'release_number'}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '155', 'type': 'attribute', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'Release'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'REVIEWING'}; {'id': '160', 'type': 'expression_statement', 'children': ['161']}; {'id': '161', 'type': 'call', 'children': ['162', '167']}; {'id': '162', 'type': 'attribute', 'children': ['163', '166']}; {'id': '163', 'type': 'attribute', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '167', 'type': 'argument_list', 'children': ['168']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'release'}; {'id': '169', 'type': 'return_statement', 'children': ['170']}; {'id': '170', 'type': 'True', 'children': []}
Moves a release candidate to reviewing if all runs are done.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'download'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '37', '51', '68', '81', '98', '112', '129', '146', '164', '187', '202', '229']}; {'id': '5', 'type': 'try_statement', 'children': ['6', '16']}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'auth'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'can_user_access_build'}; {'id': '14', 'type': 'argument_list', 'children': ['15']}; {'id': '15', 'type': 'string', 'children': [], 'value': "'build_id'"}; {'id': '16', 'type': 'except_clause', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'HTTPException'}; {'id': '18', 'type': 'block', 'children': ['19', '26']}; {'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': 'logging'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'string', 'children': [], 'value': "'User access to artifact failed. Trying API key.'"}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '31']}; {'id': '28', 'type': 'pattern_list', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'build'}; {'id': '31', 'type': 'call', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'auth'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'can_api_key_access_build'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'string', 'children': [], 'value': "'build_id'"}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '40', 'type': 'call', 'children': ['41', '46']}; {'id': '41', 'type': 'attribute', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '46', 'type': 'argument_list', 'children': ['47', '48']}; {'id': '47', 'type': 'string', 'children': [], 'value': "'sha1sum'"}; {'id': '48', 'type': 'keyword_argument', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '51', 'type': 'if_statement', 'children': ['52', '54']}; {'id': '52', 'type': 'not_operator', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '54', 'type': 'block', 'children': ['55', '63']}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '60', 'type': 'argument_list', 'children': ['61', '62']}; {'id': '61', 'type': 'string', 'children': [], 'value': "'Artifact sha1sum=%r not supplied'"}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'abort'}; {'id': '66', 'type': 'argument_list', 'children': ['67']}; {'id': '67', 'type': 'integer', 'children': [], 'value': '404'}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'artifact'}; {'id': '71', 'type': 'call', 'children': ['72', '79']}; {'id': '72', 'type': 'attribute', 'children': ['73', '78']}; {'id': '73', 'type': 'attribute', 'children': ['74', '77']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'Artifact'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '81', 'type': 'if_statement', 'children': ['82', '84']}; {'id': '82', 'type': 'not_operator', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'artifact'}; {'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': 'logging'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '90', 'type': 'argument_list', 'children': ['91', '92']}; {'id': '91', 'type': 'string', 'children': [], 'value': "'Artifact sha1sum=%r does not exist'"}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'abort'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'integer', 'children': [], 'value': '404'}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '101', 'type': 'call', 'children': ['102', '107']}; {'id': '102', 'type': 'attribute', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '107', 'type': 'argument_list', 'children': ['108', '109']}; {'id': '108', 'type': 'string', 'children': [], 'value': "'build_id'"}; {'id': '109', 'type': 'keyword_argument', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '112', 'type': 'if_statement', 'children': ['113', '115']}; {'id': '113', 'type': 'not_operator', 'children': ['114']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '115', 'type': 'block', 'children': ['116', '124']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '121', 'type': 'argument_list', 'children': ['122', '123']}; {'id': '122', 'type': 'string', 'children': [], 'value': "'build_id missing for artifact sha1sum=%r'"}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'call', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'abort'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'integer', 'children': [], 'value': '404'}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'assignment', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'is_owned'}; {'id': '132', 'type': 'call', 'children': ['133', '145']}; {'id': '133', 'type': 'attribute', 'children': ['134', '144']}; {'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': 'artifact'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'owners'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'filter_by'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'keyword_argument', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'first'}; {'id': '145', 'type': 'argument_list', 'children': []}; {'id': '146', 'type': 'if_statement', 'children': ['147', '149']}; {'id': '147', 'type': 'not_operator', 'children': ['148']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'is_owned'}; {'id': '149', 'type': 'block', 'children': ['150', '159']}; {'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': 'logging'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '155', 'type': 'argument_list', 'children': ['156', '157', '158']}; {'id': '156', 'type': 'string', 'children': [], 'value': "'build_id=%r not owner of artifact sha1sum=%r'"}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'build_id'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'abort'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'integer', 'children': [], 'value': '403'}; {'id': '164', 'type': 'decorated_definition', 'children': ['165', '169']}; {'id': '165', 'type': 'decorator', 'children': ['166']}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'after_this_request'}; {'id': '169', 'type': 'function_definition', 'children': ['170', '171', '173']}; {'id': '170', 'type': 'function_name', 'children': [], 'value': 'no_session'}; {'id': '171', 'type': 'parameters', 'children': ['172']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '173', 'type': 'block', 'children': ['174']}; {'id': '174', 'type': 'if_statement', 'children': ['175', '180']}; {'id': '175', 'type': 'comparison_operator', 'children': ['176', '177'], 'value': 'in'}; {'id': '176', 'type': 'string', 'children': [], 'value': "'Set-Cookie'"}; {'id': '177', 'type': 'attribute', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '180', 'type': 'block', 'children': ['181']}; {'id': '181', 'type': 'delete_statement', 'children': ['182']}; {'id': '182', 'type': 'subscript', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '186', 'type': 'string', 'children': [], 'value': "'Set-Cookie'"}; {'id': '187', 'type': 'if_statement', 'children': ['188', '194']}; {'id': '188', 'type': 'not_operator', 'children': ['189']}; {'id': '189', 'type': 'call', 'children': ['190', '193']}; {'id': '190', 'type': 'attribute', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'is_production'}; {'id': '193', 'type': 'argument_list', 'children': []}; {'id': '194', 'type': 'block', 'children': ['195']}; {'id': '195', 'type': 'expression_statement', 'children': ['196']}; {'id': '196', 'type': 'call', 'children': ['197', '200']}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'sleep'}; {'id': '200', 'type': 'argument_list', 'children': ['201']}; {'id': '201', 'type': 'float', 'children': [], 'value': '1.5'}; {'id': '202', 'type': 'if_statement', 'children': ['203', '215']}; {'id': '203', 'type': 'boolean_operator', 'children': ['204', '207'], 'value': 'and'}; {'id': '204', 'type': 'attribute', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'request'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'if_none_match'}; {'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': 'request'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'if_none_match'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'contains'}; {'id': '213', 'type': 'argument_list', 'children': ['214']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'sha1sum'}; {'id': '215', 'type': 'block', 'children': ['216', '227']}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'assignment', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '219', 'type': 'call', 'children': ['220', '223']}; {'id': '220', 'type': 'attribute', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'flask'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'Response'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'keyword_argument', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '226', 'type': 'integer', 'children': [], 'value': '304'}; {'id': '227', 'type': 'return_statement', 'children': ['228']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '229', 'type': 'return_statement', 'children': ['230']}; {'id': '230', 'type': 'call', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': '_get_artifact_response'}; {'id': '232', 'type': 'argument_list', 'children': ['233']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'artifact'}
Downloads an artifact by it's content hash.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_run'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '5', 'type': 'block', 'children': ['6', '23']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '16']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '11'], 'value': 'in'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'status'}; {'id': '11', 'type': 'attribute', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'models'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'Run'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'DIFF_NEEDED_STATES'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'tuple', 'children': ['19', '20']}; {'id': '19', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '23', 'type': 'return_statement', 'children': ['24']}; {'id': '24', 'type': 'tuple', 'children': ['25', '26']}; {'id': '25', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'run'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'name'}
Sort function for runs within a release.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_do_download_file'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'fh'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'num_retries'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'min_delay_seconds'}; {'id': '9', 'type': 'block', 'children': ['10', '18', '22', '26', '383']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'hasher'}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'hashlib'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'sha256'}; {'id': '17', 'type': 'argument_list', 'children': []}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'delay'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'min_delay_seconds'}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'retries_left'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'num_retries'}; {'id': '26', 'type': 'while_statement', 'children': ['27', '28']}; {'id': '27', 'type': 'True', 'children': []}; {'id': '28', 'type': 'block', 'children': ['29']}; {'id': '29', 'type': 'try_statement', 'children': ['30', '340']}; {'id': '30', 'type': 'block', 'children': ['31', '77']}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '34', 'type': 'call', 'children': ['35', '40']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'get_file'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': '_request'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '59', '62']}; {'id': '41', 'type': 'call', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '43', 'type': 'argument_list', 'children': ['44', '49', '54']}; {'id': '44', 'type': 'keyword_argument', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '49', 'type': 'keyword_argument', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '54', 'type': 'keyword_argument', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'replica'}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'replica'}; {'id': '59', 'type': 'keyword_argument', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'stream'}; {'id': '61', 'type': 'True', 'children': []}; {'id': '62', 'type': 'keyword_argument', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '64', 'type': 'dictionary', 'children': ['65']}; {'id': '65', 'type': 'pair', 'children': ['66', '67']}; {'id': '66', 'type': 'string', 'children': [], 'value': "'Range'"}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'string', 'children': [], 'value': '"bytes={}-"'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '71', 'type': 'argument_list', 'children': ['72']}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'fh'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'tell'}; {'id': '76', 'type': 'argument_list', 'children': []}; {'id': '77', 'type': 'try_statement', 'children': ['78', '332']}; {'id': '78', 'type': 'block', 'children': ['79', '116', '127', '131', '143', '183', '187', '191', '281', '331']}; {'id': '79', 'type': 'if_statement', 'children': ['80', '84']}; {'id': '80', 'type': 'not_operator', 'children': ['81']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'ok'}; {'id': '84', 'type': 'block', 'children': ['85', '100', '115']}; {'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': 'logger'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '90', 'type': 'argument_list', 'children': ['91', '92']}; {'id': '91', 'type': 'string', 'children': [], 'value': '"%s"'}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'string', 'children': [], 'value': '"File {}: GET FAILED."'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '105', 'type': 'argument_list', 'children': ['106', '107']}; {'id': '106', 'type': 'string', 'children': [], 'value': '"%s"'}; {'id': '107', 'type': 'call', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'string', 'children': [], 'value': '"Response: {}"'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '115', 'type': 'break_statement', 'children': []}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'assignment', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'int'}; {'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': 'fh'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'tell'}; {'id': '126', 'type': 'argument_list', 'children': []}; {'id': '127', 'type': 'expression_statement', 'children': ['128']}; {'id': '128', 'type': 'assignment', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '130', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '131', 'type': 'expression_statement', 'children': ['132']}; {'id': '132', 'type': 'assignment', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'content_range_header'}; {'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': 'response'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '140', 'type': 'argument_list', 'children': ['141', '142']}; {'id': '141', 'type': 'string', 'children': [], 'value': "'Content-Range'"}; {'id': '142', 'type': 'None', 'children': []}; {'id': '143', 'type': 'if_statement', 'children': ['144', '147']}; {'id': '144', 'type': 'comparison_operator', 'children': ['145', '146'], 'value': 'is'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'content_range_header'}; {'id': '146', 'type': 'None', 'children': []}; {'id': '147', 'type': 'block', 'children': ['148', '157', '166']}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'cre'}; {'id': '151', 'type': 'call', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'compile'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'string', 'children': [], 'value': '"bytes (\\d+)-(\\d+)"'}; {'id': '157', 'type': 'expression_statement', 'children': ['158']}; {'id': '158', 'type': 'assignment', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'mo'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'cre'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'search'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'content_range_header'}; {'id': '166', 'type': 'if_statement', 'children': ['167', '170']}; {'id': '167', 'type': 'comparison_operator', 'children': ['168', '169'], 'value': 'is'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'mo'}; {'id': '169', 'type': 'None', 'children': []}; {'id': '170', 'type': 'block', 'children': ['171']}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'assignment', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '174', 'type': 'call', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '176', 'type': 'argument_list', 'children': ['177']}; {'id': '177', 'type': 'call', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'mo'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'group'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '183', 'type': 'expression_statement', 'children': ['184']}; {'id': '184', 'type': 'augmented_assignment', 'children': ['185', '186'], 'value': '-='}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '187', 'type': 'assert_statement', 'children': ['188']}; {'id': '188', 'type': 'comparison_operator', 'children': ['189', '190'], 'value': '>='}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '190', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '191', 'type': 'if_statement', 'children': ['192', '199', '216']}; {'id': '192', 'type': 'boolean_operator', 'children': ['193', '196'], 'value': 'and'}; {'id': '193', 'type': 'comparison_operator', 'children': ['194', '195'], 'value': '>'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '195', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '196', 'type': 'comparison_operator', 'children': ['197', '198'], 'value': '=='}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '198', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '199', 'type': 'block', 'children': ['200']}; {'id': '200', 'type': 'expression_statement', 'children': ['201']}; {'id': '201', 'type': 'call', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '205', 'type': 'argument_list', 'children': ['206', '207']}; {'id': '206', 'type': 'string', 'children': [], 'value': '"%s"'}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'string', 'children': [], 'value': '"File {}: Resuming at {}."'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '211', 'type': 'argument_list', 'children': ['212', '215']}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '216', 'type': 'elif_clause', 'children': ['217', '220']}; {'id': '217', 'type': 'comparison_operator', 'children': ['218', '219'], 'value': '>'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '219', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '220', 'type': 'block', 'children': ['221', '238']}; {'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': 'logger'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '226', 'type': 'argument_list', 'children': ['227', '228']}; {'id': '227', 'type': 'string', 'children': [], 'value': '"%s"'}; {'id': '228', 'type': 'call', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'string', 'children': [], 'value': '"File {}: Resuming at {}. Dropping {} bytes to match"'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '232', 'type': 'argument_list', 'children': ['233', '236', '237']}; {'id': '233', 'type': 'attribute', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'server_start'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '238', 'type': 'while_statement', 'children': ['239', '242']}; {'id': '239', 'type': 'comparison_operator', 'children': ['240', '241'], 'value': '>'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '241', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '242', 'type': 'block', 'children': ['243', '253', '264', '271']}; {'id': '243', 'type': 'expression_statement', 'children': ['244']}; {'id': '244', 'type': 'assignment', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'bytes_to_read'}; {'id': '246', 'type': 'call', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '250', 'type': 'binary_operator', 'children': ['251', '252'], 'value': '*'}; {'id': '251', 'type': 'integer', 'children': [], 'value': '1024'}; {'id': '252', 'type': 'integer', 'children': [], 'value': '1024'}; {'id': '253', 'type': 'expression_statement', 'children': ['254']}; {'id': '254', 'type': 'assignment', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '256', 'type': 'call', 'children': ['257', '260']}; {'id': '257', 'type': 'attribute', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'iter_content'}; {'id': '260', 'type': 'argument_list', 'children': ['261']}; {'id': '261', 'type': 'keyword_argument', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'chunk_size'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'bytes_to_read'}; {'id': '264', 'type': 'expression_statement', 'children': ['265']}; {'id': '265', 'type': 'assignment', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '267', 'type': 'call', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'next'}; {'id': '269', 'type': 'argument_list', 'children': ['270']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '271', 'type': 'if_statement', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '273', 'type': 'block', 'children': ['274']}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'augmented_assignment', 'children': ['276', '277'], 'value': '-='}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'consume_bytes'}; {'id': '277', 'type': 'call', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '279', 'type': 'argument_list', 'children': ['280']}; {'id': '280', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '281', 'type': 'for_statement', 'children': ['282', '283', '293']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '283', 'type': 'call', 'children': ['284', '287']}; {'id': '284', 'type': 'attribute', 'children': ['285', '286']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'iter_content'}; {'id': '287', 'type': 'argument_list', 'children': ['288']}; {'id': '288', 'type': 'keyword_argument', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'chunk_size'}; {'id': '290', 'type': 'binary_operator', 'children': ['291', '292'], 'value': '*'}; {'id': '291', 'type': 'integer', 'children': [], 'value': '1024'}; {'id': '292', 'type': 'integer', 'children': [], 'value': '1024'}; {'id': '293', 'type': 'block', 'children': ['294']}; {'id': '294', 'type': 'if_statement', 'children': ['295', '296']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '296', 'type': 'block', 'children': ['297', '304', '311', '321']}; {'id': '297', 'type': 'expression_statement', 'children': ['298']}; {'id': '298', 'type': 'call', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'fh'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '302', 'type': 'argument_list', 'children': ['303']}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'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': 'hasher'}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '309', 'type': 'argument_list', 'children': ['310']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'chunk'}; {'id': '311', 'type': 'expression_statement', 'children': ['312']}; {'id': '312', 'type': 'assignment', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'retries_left'}; {'id': '314', 'type': 'call', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '316', 'type': 'argument_list', 'children': ['317', '320']}; {'id': '317', 'type': 'binary_operator', 'children': ['318', '319'], 'value': '+'}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'retries_left'}; {'id': '319', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'num_retries'}; {'id': '321', 'type': 'expression_statement', 'children': ['322']}; {'id': '322', 'type': 'assignment', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'delay'}; {'id': '324', 'type': 'call', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'max'}; {'id': '326', 'type': 'argument_list', 'children': ['327', '330']}; {'id': '327', 'type': 'binary_operator', 'children': ['328', '329'], 'value': '/'}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'delay'}; {'id': '329', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'min_delay_seconds'}; {'id': '331', 'type': 'break_statement', 'children': []}; {'id': '332', 'type': 'finally_clause', 'children': ['333']}; {'id': '333', 'type': 'block', 'children': ['334']}; {'id': '334', 'type': 'expression_statement', 'children': ['335']}; {'id': '335', 'type': 'call', 'children': ['336', '339']}; {'id': '336', 'type': 'attribute', 'children': ['337', '338']}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '339', 'type': 'argument_list', 'children': []}; {'id': '340', 'type': 'except_clause', 'children': ['341', '345']}; {'id': '341', 'type': 'tuple', 'children': ['342', '343', '344']}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'ChunkedEncodingError'}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'ConnectionError'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'ReadTimeout'}; {'id': '345', 'type': 'block', 'children': ['346', '382']}; {'id': '346', 'type': 'if_statement', 'children': ['347', '350']}; {'id': '347', 'type': 'comparison_operator', 'children': ['348', '349'], 'value': '>'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'retries_left'}; {'id': '349', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '350', 'type': 'block', 'children': ['351', '366', '373', '377', '381']}; {'id': '351', 'type': 'expression_statement', 'children': ['352']}; {'id': '352', 'type': 'call', 'children': ['353', '356']}; {'id': '353', 'type': 'attribute', 'children': ['354', '355']}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '356', 'type': 'argument_list', 'children': ['357', '358']}; {'id': '357', 'type': 'string', 'children': [], 'value': '"%s"'}; {'id': '358', 'type': 'call', 'children': ['359', '362']}; {'id': '359', 'type': 'attribute', 'children': ['360', '361']}; {'id': '360', 'type': 'string', 'children': [], 'value': '"File {}: GET FAILED. Attempting to resume."'}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '362', 'type': 'argument_list', 'children': ['363']}; {'id': '363', 'type': 'attribute', 'children': ['364', '365']}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'dss_file'}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '366', 'type': 'expression_statement', 'children': ['367']}; {'id': '367', 'type': 'call', 'children': ['368', '371']}; {'id': '368', 'type': 'attribute', 'children': ['369', '370']}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'sleep'}; {'id': '371', 'type': 'argument_list', 'children': ['372']}; {'id': '372', 'type': 'identifier', 'children': [], 'value': 'delay'}; {'id': '373', 'type': 'expression_statement', 'children': ['374']}; {'id': '374', 'type': 'augmented_assignment', 'children': ['375', '376'], 'value': '*='}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'delay'}; {'id': '376', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '377', 'type': 'expression_statement', 'children': ['378']}; {'id': '378', 'type': 'augmented_assignment', 'children': ['379', '380'], 'value': '-='}; {'id': '379', 'type': 'identifier', 'children': [], 'value': 'retries_left'}; {'id': '380', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '381', 'type': 'continue_statement', 'children': []}; {'id': '382', 'type': 'raise_statement', 'children': []}; {'id': '383', 'type': 'return_statement', 'children': ['384']}; {'id': '384', 'type': 'call', 'children': ['385', '388']}; {'id': '385', 'type': 'attribute', 'children': ['386', '387']}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'hasher'}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'hexdigest'}; {'id': '388', 'type': 'argument_list', 'children': []}
Abstracts away complications for downloading a file, handles retries and delays, and computes its hash
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'cli_bindings'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '26', '71', '112', '169', '225', '281', '332']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'KeyBindingManager'}; {'id': '10', 'type': 'argument_list', 'children': ['11', '14', '17', '20', '23']}; {'id': '11', 'type': 'keyword_argument', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'enable_open_in_editor'}; {'id': '13', 'type': 'True', 'children': []}; {'id': '14', 'type': 'keyword_argument', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'enable_system_bindings'}; {'id': '16', 'type': 'True', 'children': []}; {'id': '17', 'type': 'keyword_argument', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'enable_auto_suggest_bindings'}; {'id': '19', 'type': 'True', 'children': []}; {'id': '20', 'type': 'keyword_argument', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'enable_search'}; {'id': '22', 'type': 'True', 'children': []}; {'id': '23', 'type': 'keyword_argument', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'enable_abort_and_exit_bindings'}; {'id': '25', 'type': 'True', 'children': []}; {'id': '26', 'type': 'decorated_definition', 'children': ['27', '38']}; {'id': '27', 'type': 'decorator', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '34']}; {'id': '29', 'type': 'attribute', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'F2'}; {'id': '38', 'type': 'function_definition', 'children': ['39', '40', '42']}; {'id': '39', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '40', 'type': 'parameters', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '42', 'type': 'block', 'children': ['43', '50', '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': '_logger'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '48', 'type': 'argument_list', 'children': ['49']}; {'id': '49', 'type': 'string', 'children': [], 'value': "'Detected F2 key.'"}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '65']}; {'id': '60', 'type': 'attribute', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'completer'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'smart_completion'}; {'id': '65', 'type': 'not_operator', 'children': ['66']}; {'id': '66', 'type': 'attribute', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'completer'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'smart_completion'}; {'id': '71', 'type': 'decorated_definition', 'children': ['72', '83']}; {'id': '72', 'type': 'decorator', 'children': ['73']}; {'id': '73', 'type': 'call', 'children': ['74', '79']}; {'id': '74', 'type': 'attribute', 'children': ['75', '78']}; {'id': '75', 'type': 'attribute', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'F3'}; {'id': '83', 'type': 'function_definition', 'children': ['84', '85', '87']}; {'id': '84', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '85', 'type': 'parameters', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '87', 'type': 'block', 'children': ['88', '95', '103']}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'string', 'children': [], 'value': "'Detected F3 key.'"}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'assignment', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '98', 'type': 'attribute', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'always_multiline'}; {'id': '108', 'type': 'not_operator', 'children': ['109']}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'buf'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'always_multiline'}; {'id': '112', 'type': 'decorated_definition', 'children': ['113', '124']}; {'id': '113', 'type': 'decorator', 'children': ['114']}; {'id': '114', 'type': 'call', 'children': ['115', '120']}; {'id': '115', 'type': 'attribute', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '120', 'type': 'argument_list', 'children': ['121']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'F4'}; {'id': '124', 'type': 'function_definition', 'children': ['125', '126', '128']}; {'id': '125', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '126', 'type': 'parameters', 'children': ['127']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '128', 'type': 'block', 'children': ['129', '136']}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'call', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'string', 'children': [], 'value': "'Detected F4 key.'"}; {'id': '136', 'type': 'if_statement', 'children': ['137', '146', '157']}; {'id': '137', 'type': 'comparison_operator', 'children': ['138', '143'], 'value': '=='}; {'id': '138', 'type': 'attribute', 'children': ['139', '142']}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'editing_mode'}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'EditingMode'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'VI'}; {'id': '146', 'type': 'block', 'children': ['147']}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'assignment', 'children': ['149', '154']}; {'id': '149', 'type': 'attribute', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'editing_mode'}; {'id': '154', 'type': 'attribute', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'EditingMode'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'EMACS'}; {'id': '157', 'type': 'else_clause', 'children': ['158']}; {'id': '158', 'type': 'block', 'children': ['159']}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'assignment', 'children': ['161', '166']}; {'id': '161', 'type': 'attribute', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'editing_mode'}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'EditingMode'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'VI'}; {'id': '169', 'type': 'decorated_definition', 'children': ['170', '181']}; {'id': '170', 'type': 'decorator', 'children': ['171']}; {'id': '171', 'type': 'call', 'children': ['172', '177']}; {'id': '172', 'type': 'attribute', 'children': ['173', '176']}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '177', 'type': 'argument_list', 'children': ['178']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'Tab'}; {'id': '181', 'type': 'function_definition', 'children': ['182', '183', '185']}; {'id': '182', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '183', 'type': 'parameters', 'children': ['184']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '185', 'type': 'block', 'children': ['186', '193', '201']}; {'id': '186', 'type': 'expression_statement', 'children': ['187']}; {'id': '187', 'type': 'call', 'children': ['188', '191']}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '191', 'type': 'argument_list', 'children': ['192']}; {'id': '192', 'type': 'string', 'children': [], 'value': "'Detected <Tab> key.'"}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '196', 'type': 'attribute', 'children': ['197', '200']}; {'id': '197', 'type': 'attribute', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '201', 'type': 'if_statement', 'children': ['202', '205', '212']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'complete_state'}; {'id': '205', 'type': 'block', 'children': ['206']}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'complete_next'}; {'id': '211', 'type': 'argument_list', 'children': []}; {'id': '212', 'type': 'else_clause', 'children': ['213']}; {'id': '213', 'type': 'block', 'children': ['214']}; {'id': '214', 'type': 'expression_statement', 'children': ['215']}; {'id': '215', 'type': 'call', 'children': ['216', '221']}; {'id': '216', 'type': 'attribute', 'children': ['217', '220']}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'start_completion'}; {'id': '221', 'type': 'argument_list', 'children': ['222']}; {'id': '222', 'type': 'keyword_argument', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'select_first'}; {'id': '224', 'type': 'True', 'children': []}; {'id': '225', 'type': 'decorated_definition', 'children': ['226', '237']}; {'id': '226', 'type': 'decorator', 'children': ['227']}; {'id': '227', 'type': 'call', 'children': ['228', '233']}; {'id': '228', 'type': 'attribute', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '233', 'type': 'argument_list', 'children': ['234']}; {'id': '234', 'type': 'attribute', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'ControlSpace'}; {'id': '237', 'type': 'function_definition', 'children': ['238', '239', '241']}; {'id': '238', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '239', 'type': 'parameters', 'children': ['240']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '241', 'type': 'block', 'children': ['242', '249', '257']}; {'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': '_logger'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '247', 'type': 'argument_list', 'children': ['248']}; {'id': '248', 'type': 'string', 'children': [], 'value': "'Detected <C-Space> key.'"}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '252', 'type': 'attribute', 'children': ['253', '256']}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '257', 'type': 'if_statement', 'children': ['258', '261', '268']}; {'id': '258', 'type': 'attribute', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'complete_state'}; {'id': '261', 'type': 'block', 'children': ['262']}; {'id': '262', 'type': 'expression_statement', 'children': ['263']}; {'id': '263', 'type': 'call', 'children': ['264', '267']}; {'id': '264', 'type': 'attribute', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'complete_next'}; {'id': '267', 'type': 'argument_list', 'children': []}; {'id': '268', 'type': 'else_clause', 'children': ['269']}; {'id': '269', 'type': 'block', 'children': ['270']}; {'id': '270', 'type': 'expression_statement', 'children': ['271']}; {'id': '271', 'type': 'call', 'children': ['272', '277']}; {'id': '272', 'type': 'attribute', 'children': ['273', '276']}; {'id': '273', 'type': 'attribute', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'start_completion'}; {'id': '277', 'type': 'argument_list', 'children': ['278']}; {'id': '278', 'type': 'keyword_argument', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'select_first'}; {'id': '280', 'type': 'False', 'children': []}; {'id': '281', 'type': 'decorated_definition', 'children': ['282', '298']}; {'id': '282', 'type': 'decorator', 'children': ['283']}; {'id': '283', 'type': 'call', 'children': ['284', '289']}; {'id': '284', 'type': 'attribute', 'children': ['285', '288']}; {'id': '285', 'type': 'attribute', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'registry'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'add_binding'}; {'id': '289', 'type': 'argument_list', 'children': ['290', '293']}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'Keys'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'ControlJ'}; {'id': '293', 'type': 'keyword_argument', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'filter'}; {'id': '295', 'type': 'call', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'HasSelectedCompletion'}; {'id': '297', 'type': 'argument_list', 'children': []}; {'id': '298', 'type': 'function_definition', 'children': ['299', '300', '302']}; {'id': '299', 'type': 'function_name', 'children': [], 'value': '_'}; {'id': '300', 'type': 'parameters', 'children': ['301']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '302', 'type': 'block', 'children': ['303', '310', '318', '326']}; {'id': '303', 'type': 'expression_statement', 'children': ['304']}; {'id': '304', 'type': 'call', 'children': ['305', '308']}; {'id': '305', 'type': 'attribute', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '308', 'type': 'argument_list', 'children': ['309']}; {'id': '309', 'type': 'string', 'children': [], 'value': "'Detected <C-J> key.'"}; {'id': '310', 'type': 'expression_statement', 'children': ['311']}; {'id': '311', 'type': 'assignment', 'children': ['312', '317']}; {'id': '312', 'type': 'attribute', 'children': ['313', '316']}; {'id': '313', 'type': 'attribute', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'complete_state'}; {'id': '317', 'type': 'None', 'children': []}; {'id': '318', 'type': 'expression_statement', 'children': ['319']}; {'id': '319', 'type': 'assignment', 'children': ['320', '321']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '321', 'type': 'attribute', 'children': ['322', '325']}; {'id': '322', 'type': 'attribute', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'cli'}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'current_buffer'}; {'id': '326', 'type': 'expression_statement', 'children': ['327']}; {'id': '327', 'type': 'assignment', 'children': ['328', '331']}; {'id': '328', 'type': 'attribute', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'complete_state'}; {'id': '331', 'type': 'None', 'children': []}; {'id': '332', 'type': 'return_statement', 'children': ['333']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'key_binding_manager'}
Custom key bindings for cli.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_thumbnail_options'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '7', 'type': 'block', 'children': ['8', '16', '20', '30', '40', '54', '79', '90', '202']}; {'id': '8', 'type': 'expression_statement', 'children': ['9']}; {'id': '9', 'type': 'assignment', 'children': ['10', '13']}; {'id': '10', 'type': 'pattern_list', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '13', 'type': 'expression_list', 'children': ['14', '15']}; {'id': '14', 'type': 'None', 'children': []}; {'id': '15', 'type': 'None', 'children': []}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'subject_location'}; {'id': '19', 'type': 'False', 'children': []}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'placeholder_width'}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '27', 'type': 'argument_list', 'children': ['28', '29']}; {'id': '28', 'type': 'string', 'children': [], 'value': "'width'"}; {'id': '29', 'type': 'None', 'children': []}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'placeholder_height'}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '37', 'type': 'argument_list', 'children': ['38', '39']}; {'id': '38', 'type': 'string', 'children': [], 'value': "'height'"}; {'id': '39', 'type': 'None', 'children': []}; {'id': '40', 'type': 'if_statement', 'children': ['41', '46']}; {'id': '41', 'type': 'boolean_operator', 'children': ['42', '45'], 'value': 'and'}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'use_autoscale'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'placeholder_width'}; {'id': '46', 'type': 'block', 'children': ['47']}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '50', 'type': 'call', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'placeholder_width'}; {'id': '54', 'type': 'if_statement', 'children': ['55', '60', '68']}; {'id': '55', 'type': 'boolean_operator', 'children': ['56', '59'], 'value': 'and'}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'use_autoscale'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'placeholder_height'}; {'id': '60', 'type': 'block', 'children': ['61']}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '66', 'type': 'argument_list', 'children': ['67']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'placeholder_height'}; {'id': '68', 'type': 'elif_clause', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'width'}; {'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': 'width'}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '79', 'type': 'if_statement', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'height'}; {'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': 'height'}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '90', 'type': 'if_statement', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '94', 'type': 'block', 'children': ['95', '110', '144', '178', '190']}; {'id': '95', 'type': 'if_statement', 'children': ['96', '101']}; {'id': '96', 'type': 'attribute', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'subject_location'}; {'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': 'subject_location'}; {'id': '105', 'type': 'attribute', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'subject_location'}; {'id': '110', 'type': 'if_statement', 'children': ['111', '115']}; {'id': '111', 'type': 'boolean_operator', 'children': ['112', '114'], 'value': 'and'}; {'id': '112', 'type': 'not_operator', 'children': ['113']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'assignment', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '119', 'type': 'call', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'binary_operator', 'children': ['123', '136'], 'value': '/'}; {'id': '123', 'type': 'binary_operator', 'children': ['124', '128'], 'value': '*'}; {'id': '124', 'type': 'call', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '128', 'type': 'call', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'attribute', 'children': ['132', '135']}; {'id': '132', 'type': 'attribute', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '136', 'type': 'call', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '138', 'type': 'argument_list', 'children': ['139']}; {'id': '139', 'type': 'attribute', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '144', 'type': 'if_statement', 'children': ['145', '149']}; {'id': '145', 'type': 'boolean_operator', 'children': ['146', '148'], 'value': 'and'}; {'id': '146', 'type': 'not_operator', 'children': ['147']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '153', 'type': 'call', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'binary_operator', 'children': ['157', '170'], 'value': '/'}; {'id': '157', 'type': 'binary_operator', 'children': ['158', '162'], 'value': '*'}; {'id': '158', 'type': 'call', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '162', 'type': 'call', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'attribute', 'children': ['166', '169']}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '170', 'type': 'call', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '172', 'type': 'argument_list', 'children': ['173']}; {'id': '173', 'type': 'attribute', 'children': ['174', '177']}; {'id': '174', 'type': 'attribute', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '178', 'type': 'if_statement', 'children': ['179', '181']}; {'id': '179', 'type': 'not_operator', 'children': ['180']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '181', 'type': 'block', 'children': ['182']}; {'id': '182', 'type': 'expression_statement', 'children': ['183']}; {'id': '183', 'type': 'assignment', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '185', 'type': 'attribute', 'children': ['186', '189']}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '190', 'type': 'if_statement', 'children': ['191', '193']}; {'id': '191', 'type': 'not_operator', 'children': ['192']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '193', 'type': 'block', 'children': ['194']}; {'id': '194', 'type': 'expression_statement', 'children': ['195']}; {'id': '195', 'type': 'assignment', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '197', 'type': 'attribute', 'children': ['198', '201']}; {'id': '198', 'type': 'attribute', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'instance'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'image'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '202', 'type': 'return_statement', 'children': ['203']}; {'id': '203', 'type': 'dictionary', 'children': ['204', '209']}; {'id': '204', 'type': 'pair', 'children': ['205', '206']}; {'id': '205', 'type': 'string', 'children': [], 'value': "'size'"}; {'id': '206', 'type': 'tuple', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'width'}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'height'}; {'id': '209', 'type': 'pair', 'children': ['210', '211']}; {'id': '210', 'type': 'string', 'children': [], 'value': "'subject_location'"}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'subject_location'}
Return the size and options of the thumbnail that should be inserted
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_args'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '40', '81', '162', '171', '192']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'arg_roles'}; {'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': 'args'}; {'id': '13', 'type': 'binary_operator', 'children': ['14', '20', '21'], 'value': '+'}; {'id': '14', 'type': 'call', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'string', 'children': [], 'value': "'arg'"}; {'id': '20', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '21', 'type': 'list', 'children': ['22', '28', '34'], 'value': "[node.find('arg1'), node.find('arg2'), node.find('arg3')]"}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'string', 'children': [], 'value': "'arg1'"}; {'id': '28', 'type': 'call', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'string', 'children': [], 'value': "'arg2'"}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'string', 'children': [], 'value': "'arg3'"}; {'id': '40', 'type': 'for_statement', 'children': ['41', '42', '43']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '43', 'type': 'block', 'children': ['44']}; {'id': '44', 'type': 'if_statement', 'children': ['45', '48']}; {'id': '45', 'type': 'comparison_operator', 'children': ['46', '47'], 'value': 'is'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '47', 'type': 'None', 'children': []}; {'id': '48', 'type': 'block', 'children': ['49', '60']}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '52', 'type': 'call', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '60', 'type': 'if_statement', 'children': ['61', '64']}; {'id': '61', 'type': 'comparison_operator', 'children': ['62', '63'], 'value': 'is'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '63', 'type': 'None', 'children': []}; {'id': '64', 'type': 'block', 'children': ['65']}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'assignment', 'children': ['67', '74']}; {'id': '67', 'type': 'subscript', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'arg_roles'}; {'id': '69', 'type': 'subscript', 'children': ['70', '73']}; {'id': '70', 'type': 'attribute', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '73', 'type': 'string', 'children': [], 'value': "'role'"}; {'id': '74', 'type': 'tuple', 'children': ['75', '80']}; {'id': '75', 'type': 'subscript', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '79', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '81', 'type': 'if_statement', 'children': ['82', '90']}; {'id': '82', 'type': 'comparison_operator', 'children': ['83', '89'], 'value': 'is'}; {'id': '83', 'type': 'call', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'string', 'children': [], 'value': "'features'"}; {'id': '89', 'type': 'None', 'children': []}; {'id': '90', 'type': 'block', 'children': ['91', '100', '123', '139']}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'inevents'}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'string', 'children': [], 'value': "'features/inevent'"}; {'id': '100', 'type': 'for_statement', 'children': ['101', '102', '103']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'inevents'}; {'id': '103', 'type': 'block', 'children': ['104']}; {'id': '104', 'type': 'if_statement', 'children': ['105', '110']}; {'id': '105', 'type': 'comparison_operator', 'children': ['106', '107'], 'value': 'in'}; {'id': '106', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '110', 'type': 'block', 'children': ['111']}; {'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': 'arg_roles'}; {'id': '115', 'type': 'string', 'children': [], 'value': "'inevent'"}; {'id': '116', 'type': 'tuple', 'children': ['117', '122']}; {'id': '117', 'type': 'subscript', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '121', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'ptms'}; {'id': '126', 'type': 'binary_operator', 'children': ['127', '133'], 'value': '+'}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'string', 'children': [], 'value': "'features/ptm'"}; {'id': '133', 'type': 'call', 'children': ['134', '137']}; {'id': '134', 'type': 'attribute', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'string', 'children': [], 'value': "'features/no-ptm'"}; {'id': '139', 'type': 'for_statement', 'children': ['140', '141', '142']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'ptm'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'ptms'}; {'id': '142', 'type': 'block', 'children': ['143']}; {'id': '143', 'type': 'if_statement', 'children': ['144', '149']}; {'id': '144', 'type': 'comparison_operator', 'children': ['145', '146'], 'value': 'in'}; {'id': '145', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '146', 'type': 'attribute', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '155']}; {'id': '152', 'type': 'subscript', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'arg_roles'}; {'id': '154', 'type': 'string', 'children': [], 'value': "'ptm'"}; {'id': '155', 'type': 'tuple', 'children': ['156', '161']}; {'id': '156', 'type': 'subscript', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'inevent'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '160', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'ptm'}; {'id': '162', 'type': 'expression_statement', 'children': ['163']}; {'id': '163', 'type': 'assignment', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'aw'}; {'id': '165', 'type': 'call', 'children': ['166', '169']}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '169', 'type': 'argument_list', 'children': ['170']}; {'id': '170', 'type': 'string', 'children': [], 'value': "'assoc-with'"}; {'id': '171', 'type': 'if_statement', 'children': ['172', '175']}; {'id': '172', 'type': 'comparison_operator', 'children': ['173', '174'], 'value': 'is'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'aw'}; {'id': '174', 'type': 'None', 'children': []}; {'id': '175', 'type': 'block', 'children': ['176', '184']}; {'id': '176', 'type': 'expression_statement', 'children': ['177']}; {'id': '177', 'type': 'assignment', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'aw_id'}; {'id': '179', 'type': 'subscript', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'aw'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '183', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '184', 'type': 'expression_statement', 'children': ['185']}; {'id': '185', 'type': 'assignment', 'children': ['186', '189']}; {'id': '186', 'type': 'subscript', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'arg_roles'}; {'id': '188', 'type': 'string', 'children': [], 'value': "'assoc-with'"}; {'id': '189', 'type': 'tuple', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'aw_id'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'aw'}; {'id': '192', 'type': 'return_statement', 'children': ['193']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'arg_roles'}
Return the arguments of a node in the event graph.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'map_statements'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '8', '11']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'for_statement', 'children': ['13', '14', '19']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '14', 'type': 'call', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'agent_list'}; {'id': '18', 'type': 'argument_list', 'children': []}; {'id': '19', 'type': 'block', 'children': ['20', '26', '30', '71']}; {'id': '20', 'type': 'if_statement', 'children': ['21', '24']}; {'id': '21', 'type': 'comparison_operator', 'children': ['22', '23'], 'value': 'is'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'continue_statement', 'children': []}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'all_mappings'}; {'id': '29', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '30', 'type': 'for_statement', 'children': ['31', '34', '41']}; {'id': '31', 'type': 'pattern_list', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'db_name'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'db_id'}; {'id': '34', 'type': 'call', 'children': ['35', '40']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '40', 'type': 'argument_list', 'children': []}; {'id': '41', 'type': 'block', 'children': ['42', '57', '67']}; {'id': '42', 'type': 'if_statement', 'children': ['43', '48']}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '45', 'type': 'argument_list', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'db_id'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '48', 'type': 'block', 'children': ['49']}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'db_id'}; {'id': '52', 'type': 'subscript', 'children': ['53', '56']}; {'id': '53', 'type': 'subscript', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'db_id'}; {'id': '55', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '56', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'mappings'}; {'id': '60', 'type': 'call', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': '_map_id'}; {'id': '64', 'type': 'argument_list', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'db_name'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'db_id'}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'augmented_assignment', 'children': ['69', '70'], 'value': '+='}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'all_mappings'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'mappings'}; {'id': '71', 'type': 'for_statement', 'children': ['72', '77', '78']}; {'id': '72', 'type': 'pattern_list', 'children': ['73', '74', '75', '76']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'map_db_id'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'score'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'orig_db_name'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'all_mappings'}; {'id': '78', 'type': 'block', 'children': ['79', '87']}; {'id': '79', 'type': 'if_statement', 'children': ['80', '85']}; {'id': '80', 'type': 'comparison_operator', 'children': ['81', '82'], 'value': 'in'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '85', 'type': 'block', 'children': ['86']}; {'id': '86', 'type': 'continue_statement', 'children': []}; {'id': '87', 'type': 'if_statement', 'children': ['88', '91', '127']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'scored'}; {'id': '91', 'type': 'block', 'children': ['92', '113']}; {'id': '92', 'type': 'try_statement', 'children': ['93', '106']}; {'id': '93', 'type': 'block', 'children': ['94']}; {'id': '94', 'type': 'expression_statement', 'children': ['95']}; {'id': '95', 'type': 'assignment', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'orig_score'}; {'id': '97', 'type': 'subscript', 'children': ['98', '105']}; {'id': '98', 'type': 'subscript', 'children': ['99', '104']}; {'id': '99', 'type': 'subscript', 'children': ['100', '103']}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'orig_db_name'}; {'id': '104', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '105', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '106', 'type': 'except_clause', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'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': 'orig_score'}; {'id': '112', 'type': 'float', 'children': [], 'value': '1.0'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '120', '121']}; {'id': '115', 'type': 'subscript', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '120', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '121', 'type': 'list', 'children': ['122'], 'value': '[(map_db_id, score * orig_score)]'}; {'id': '122', 'type': 'tuple', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'map_db_id'}; {'id': '124', 'type': 'binary_operator', 'children': ['125', '126'], 'value': '*'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'score'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'orig_score'}; {'id': '127', 'type': 'else_clause', 'children': ['128']}; {'id': '128', 'type': 'block', 'children': ['129']}; {'id': '129', 'type': 'if_statement', 'children': ['130', '135', '147']}; {'id': '130', 'type': 'comparison_operator', 'children': ['131', '132'], 'value': 'in'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '132', 'type': 'tuple', 'children': ['133', '134']}; {'id': '133', 'type': 'string', 'children': [], 'value': "'UN'"}; {'id': '134', 'type': 'string', 'children': [], 'value': "'HUME'"}; {'id': '135', 'type': 'block', 'children': ['136']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '143']}; {'id': '138', 'type': 'subscript', 'children': ['139', '142']}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '143', 'type': 'list', 'children': ['144'], 'value': '[(map_db_id, 1.0)]'}; {'id': '144', 'type': 'tuple', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'map_db_id'}; {'id': '146', 'type': 'float', 'children': [], 'value': '1.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', '156']}; {'id': '151', 'type': 'subscript', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'map_db_name'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'map_db_id'}
Run the ontology mapping on the statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_generic_modification'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'mod_class'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '40', '48', '56', '69', '76', '88', '103', '107', '377']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '10', 'type': 'subscript', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'modclass_to_modtype'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'mod_class'}; {'id': '13', 'type': 'if_statement', 'children': ['14', '19', '32']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'issubclass'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'mod_class'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'RemoveModification'}; {'id': '19', 'type': 'block', 'children': ['20', '26']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'mod_gain_const'}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'mcct'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'LOSS'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '29', 'type': 'subscript', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'modtype_to_inverse'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '32', 'type': 'else_clause', 'children': ['33']}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'expression_statement', 'children': ['35']}; {'id': '35', 'type': 'assignment', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'mod_gain_const'}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'mcct'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'GAIN'}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'mod_filter'}; {'id': '43', 'type': 'subscript', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '45', 'type': 'slice', 'children': ['46', '47']}; {'id': '46', 'type': 'colon', 'children': []}; {'id': '47', 'type': 'integer', 'children': [], 'value': '5'}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'assignment', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'BiopaxProcessor'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': '_construct_modification_pattern'}; {'id': '55', 'type': 'argument_list', 'children': []}; {'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': 'p'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '61', 'type': 'argument_list', 'children': ['62', '67', '68']}; {'id': '62', 'type': 'call', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'mcc'}; {'id': '64', 'type': 'argument_list', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'mod_gain_const'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'mod_filter'}; {'id': '67', 'type': 'string', 'children': [], 'value': '"input simple PE"'}; {'id': '68', 'type': 'string', 'children': [], 'value': '"output simple PE"'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': '_bpp'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'string', 'children': [], 'value': "'Searcher'"}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '79', 'type': 'call', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'searchPlain'}; {'id': '83', 'type': 'argument_list', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'model'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'assignment', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'res_array'}; {'id': '91', 'type': 'list_comprehension', 'children': ['92', '96']}; {'id': '92', 'type': 'call', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': '_match_to_array'}; {'id': '94', 'type': 'argument_list', 'children': ['95']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '96', 'type': 'for_in_clause', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'm'}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'toArray'}; {'id': '102', 'type': 'argument_list', 'children': []}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '106', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '107', 'type': 'for_statement', 'children': ['108', '109', '110']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'res_array'}; {'id': '110', 'type': 'block', 'children': ['111', '122', '133', '144', '155', '166', '177', '185', '193', '221', '230', '235', '237', '249', '258']}; {'id': '111', 'type': 'expression_statement', 'children': ['112']}; {'id': '112', 'type': 'assignment', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'controller_pe'}; {'id': '114', 'type': 'subscript', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '120', 'type': 'argument_list', 'children': ['121']}; {'id': '121', 'type': 'string', 'children': [], 'value': "'controller PE'"}; {'id': '122', 'type': 'expression_statement', 'children': ['123']}; {'id': '123', 'type': 'assignment', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'input_pe'}; {'id': '125', 'type': 'subscript', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '127', 'type': 'call', 'children': ['128', '131']}; {'id': '128', 'type': 'attribute', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '131', 'type': 'argument_list', 'children': ['132']}; {'id': '132', 'type': 'string', 'children': [], 'value': "'input PE'"}; {'id': '133', 'type': 'expression_statement', 'children': ['134']}; {'id': '134', 'type': 'assignment', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'input_spe'}; {'id': '136', 'type': 'subscript', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '138', 'type': 'call', 'children': ['139', '142']}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '142', 'type': 'argument_list', 'children': ['143']}; {'id': '143', 'type': 'string', 'children': [], 'value': "'input simple PE'"}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'assignment', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'output_spe'}; {'id': '147', 'type': 'subscript', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '149', 'type': 'call', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '153', 'type': 'argument_list', 'children': ['154']}; {'id': '154', 'type': 'string', 'children': [], 'value': "'output simple PE'"}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'assignment', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'reaction'}; {'id': '158', 'type': 'subscript', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'string', 'children': [], 'value': "'Conversion'"}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '169', 'type': 'subscript', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '171', 'type': 'call', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'indexOf'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'string', 'children': [], 'value': "'Control'"}; {'id': '177', 'type': 'if_statement', 'children': ['178', '183']}; {'id': '178', 'type': 'not_operator', 'children': ['179']}; {'id': '179', 'type': 'call', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': '_is_catalysis'}; {'id': '181', 'type': 'argument_list', 'children': ['182']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '183', 'type': 'block', 'children': ['184']}; {'id': '184', 'type': 'continue_statement', 'children': []}; {'id': '185', 'type': 'expression_statement', 'children': ['186']}; {'id': '186', 'type': 'assignment', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'cat_dir'}; {'id': '188', 'type': 'call', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'getCatalysisDirection'}; {'id': '192', 'type': 'argument_list', 'children': []}; {'id': '193', 'type': 'if_statement', 'children': ['194', '205']}; {'id': '194', 'type': 'boolean_operator', 'children': ['195', '198'], 'value': 'and'}; {'id': '195', 'type': 'comparison_operator', 'children': ['196', '197'], 'value': 'is'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'cat_dir'}; {'id': '197', 'type': 'None', 'children': []}; {'id': '198', 'type': 'comparison_operator', 'children': ['199', '204'], 'value': '!='}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'cat_dir'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '203', 'type': 'argument_list', 'children': []}; {'id': '204', 'type': 'string', 'children': [], 'value': "'LEFT_TO_RIGHT'"}; {'id': '205', 'type': 'block', 'children': ['206', '220']}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '211', 'type': 'argument_list', 'children': ['212']}; {'id': '212', 'type': 'binary_operator', 'children': ['213', '214', '215'], 'value': '%'}; {'id': '213', 'type': 'string', 'children': [], 'value': "'Unexpected catalysis direction: %s.'"}; {'id': '214', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '215', 'type': 'call', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'getCatalysisDirection'}; {'id': '219', 'type': 'argument_list', 'children': []}; {'id': '220', 'type': 'continue_statement', 'children': []}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'assignment', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'enzs'}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'BiopaxProcessor'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': '_get_primary_controller'}; {'id': '228', 'type': 'argument_list', 'children': ['229']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'controller_pe'}; {'id': '230', 'type': 'if_statement', 'children': ['231', '233']}; {'id': '231', 'type': 'not_operator', 'children': ['232']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'enzs'}; {'id': '233', 'type': 'block', 'children': ['234']}; {'id': '234', 'type': 'continue_statement', 'children': []}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'string', 'children': [], 'value': "'''\n if _is_complex(input_pe):\n sub_members_in = self._get_complex_members(input_pe)\n sub_members_out = self._get_complex_members(output_pe)\n logger.info('Cannot handle complex substrates.')\n continue\n '''"}; {'id': '237', 'type': 'expression_statement', 'children': ['238']}; {'id': '238', 'type': 'assignment', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'subs'}; {'id': '240', 'type': 'call', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'BiopaxProcessor'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': '_get_agents_from_entity'}; {'id': '244', 'type': 'argument_list', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'input_spe'}; {'id': '246', 'type': 'keyword_argument', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'expand_pe'}; {'id': '248', 'type': 'False', 'children': []}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '252', 'type': 'call', 'children': ['253', '256']}; {'id': '253', 'type': 'attribute', 'children': ['254', '255']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '255', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '256', 'type': 'argument_list', 'children': ['257']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'control'}; {'id': '258', 'type': 'for_statement', 'children': ['259', '262', '275']}; {'id': '259', 'type': 'pattern_list', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '262', 'type': 'call', 'children': ['263', '266']}; {'id': '263', 'type': 'attribute', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'itertools'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'product'}; {'id': '266', 'type': 'argument_list', 'children': ['267', '271']}; {'id': '267', 'type': 'call', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': '_listify'}; {'id': '269', 'type': 'argument_list', 'children': ['270']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'enzs'}; {'id': '271', 'type': 'call', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': '_listify'}; {'id': '273', 'type': 'argument_list', 'children': ['274']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'subs'}; {'id': '275', 'type': 'block', 'children': ['276', '286', '296', '306', '331']}; {'id': '276', 'type': 'expression_statement', 'children': ['277']}; {'id': '277', 'type': 'assignment', 'children': ['278', '279', '280']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'mod_in'}; {'id': '279', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '280', 'type': 'call', 'children': ['281', '284']}; {'id': '281', 'type': 'attribute', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'BiopaxProcessor'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': '_get_entity_mods'}; {'id': '284', 'type': 'argument_list', 'children': ['285']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'input_spe'}; {'id': '286', 'type': 'expression_statement', 'children': ['287']}; {'id': '287', 'type': 'assignment', 'children': ['288', '289', '290']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'mod_out'}; {'id': '289', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '290', 'type': 'call', 'children': ['291', '294']}; {'id': '291', 'type': 'attribute', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'BiopaxProcessor'}; {'id': '293', 'type': 'identifier', 'children': [], 'value': '_get_entity_mods'}; {'id': '294', 'type': 'argument_list', 'children': ['295']}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'output_spe'}; {'id': '296', 'type': 'expression_statement', 'children': ['297']}; {'id': '297', 'type': 'assignment', 'children': ['298', '301']}; {'id': '298', 'type': 'attribute', 'children': ['299', '300']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '301', 'type': 'call', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': '_get_mod_intersection'}; {'id': '303', 'type': 'argument_list', 'children': ['304', '305']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'mod_in'}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'mod_out'}; {'id': '306', 'type': 'if_statement', 'children': ['307', '312', '321']}; {'id': '307', 'type': 'call', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'issubclass'}; {'id': '309', 'type': 'argument_list', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'mod_class'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'AddModification'}; {'id': '312', 'type': 'block', 'children': ['313']}; {'id': '313', 'type': 'expression_statement', 'children': ['314']}; {'id': '314', 'type': 'assignment', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'gained_mods'}; {'id': '316', 'type': 'call', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': '_get_mod_difference'}; {'id': '318', 'type': 'argument_list', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'mod_out'}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'mod_in'}; {'id': '321', 'type': 'else_clause', 'children': ['322']}; {'id': '322', 'type': 'block', 'children': ['323']}; {'id': '323', 'type': 'expression_statement', 'children': ['324']}; {'id': '324', 'type': 'assignment', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'gained_mods'}; {'id': '326', 'type': 'call', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': '_get_mod_difference'}; {'id': '328', 'type': 'argument_list', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'mod_in'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'mod_out'}; {'id': '331', 'type': 'for_statement', 'children': ['332', '333', '334']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'gained_mods'}; {'id': '334', 'type': 'block', 'children': ['335', '347', '364']}; {'id': '335', 'type': 'if_statement', 'children': ['336', '345']}; {'id': '336', 'type': 'comparison_operator', 'children': ['337', '340'], 'value': 'not'}; {'id': '337', 'type': 'attribute', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '340', 'type': 'tuple', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '342', 'type': 'subscript', 'children': ['343', '344']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'modtype_to_inverse'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '345', 'type': 'block', 'children': ['346']}; {'id': '346', 'type': 'continue_statement', 'children': []}; {'id': '347', 'type': 'expression_statement', 'children': ['348']}; {'id': '348', 'type': 'assignment', 'children': ['349', '350']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '350', 'type': 'call', 'children': ['351', '352']}; {'id': '351', 'type': 'identifier', 'children': [], 'value': 'mod_class'}; {'id': '352', 'type': 'argument_list', 'children': ['353', '354', '355', '358', '361']}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '354', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '355', 'type': 'attribute', 'children': ['356', '357']}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '358', 'type': 'attribute', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '361', 'type': 'keyword_argument', 'children': ['362', '363']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '363', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '364', 'type': 'expression_statement', 'children': ['365']}; {'id': '365', 'type': 'call', 'children': ['366', '369']}; {'id': '366', 'type': 'attribute', 'children': ['367', '368']}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '368', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '369', 'type': 'argument_list', 'children': ['370']}; {'id': '370', 'type': 'call', 'children': ['371', '372']}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'decode_obj'}; {'id': '372', 'type': 'argument_list', 'children': ['373', '374']}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '374', 'type': 'keyword_argument', 'children': ['375', '376']}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'encoding'}; {'id': '376', 'type': 'string', 'children': [], 'value': "'utf-8'"}; {'id': '377', 'type': 'return_statement', 'children': ['378']}; {'id': '378', 'type': 'identifier', 'children': [], 'value': 'stmts'}
Get all modification reactions given a Modification class.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_activations'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17', '28', '39']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'act_events'}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::ACTIVATE\']"'}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'inact_events'}; {'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': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::DEACTIVATE\']"'}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'augmented_assignment', 'children': ['30', '31'], 'value': '+='}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'inact_events'}; {'id': '31', 'type': 'call', 'children': ['32', '37']}; {'id': '32', 'type': 'attribute', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::INHIBIT\']"'}; {'id': '39', 'type': 'for_statement', 'children': ['40', '41', '45']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '41', 'type': '()', 'children': ['42']}; {'id': '42', 'type': 'binary_operator', 'children': ['43', '44'], 'value': '+'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'act_events'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'inact_events'}; {'id': '45', 'type': 'block', 'children': ['46', '54', '62', '71', '77', '88', '101', '111', '117', '126', '139', '150', '163', '173', '186', '190', '255', '264', '273']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '49', 'type': 'subscript', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '53', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '54', 'type': 'if_statement', 'children': ['55', '60']}; {'id': '55', 'type': 'comparison_operator', 'children': ['56', '57'], 'value': 'in'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': '_static_events'}; {'id': '60', 'type': 'block', 'children': ['61']}; {'id': '61', 'type': 'continue_statement', 'children': []}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'assignment', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '65', 'type': 'call', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AGENT\']"'}; {'id': '71', 'type': 'if_statement', 'children': ['72', '75']}; {'id': '72', 'type': 'comparison_operator', 'children': ['73', '74'], 'value': 'is'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '74', 'type': 'None', 'children': []}; {'id': '75', 'type': 'block', 'children': ['76']}; {'id': '76', 'type': 'continue_statement', 'children': []}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'id': '80', 'type': 'call', 'children': ['81', '86']}; {'id': '81', 'type': 'attribute', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '86', 'type': 'argument_list', 'children': ['87']}; {'id': '87', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '88', 'type': 'if_statement', 'children': ['89', '92']}; {'id': '89', 'type': 'comparison_operator', 'children': ['90', '91'], 'value': 'is'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'id': '91', 'type': 'None', 'children': []}; {'id': '92', 'type': 'block', 'children': ['93', '100']}; {'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': 'logger'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'string', 'children': [], 'value': "'Skipping activation with missing activator agent'"}; {'id': '100', 'type': 'continue_statement', 'children': []}; {'id': '101', 'type': 'expression_statement', 'children': ['102']}; {'id': '102', 'type': 'assignment', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'activator_agent'}; {'id': '104', 'type': 'call', 'children': ['105', '108']}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '108', 'type': 'argument_list', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '111', 'type': 'if_statement', 'children': ['112', '115']}; {'id': '112', 'type': 'comparison_operator', 'children': ['113', '114'], 'value': 'is'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'activator_agent'}; {'id': '114', 'type': 'None', 'children': []}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'continue_statement', 'children': []}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'assignment', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '120', 'type': 'call', 'children': ['121', '124']}; {'id': '121', 'type': 'attribute', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '124', 'type': 'argument_list', 'children': ['125']}; {'id': '125', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '126', 'type': 'if_statement', 'children': ['127', '130']}; {'id': '127', 'type': 'comparison_operator', 'children': ['128', '129'], 'value': 'is'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '129', 'type': 'None', 'children': []}; {'id': '130', 'type': 'block', 'children': ['131', '138']}; {'id': '131', 'type': 'expression_statement', 'children': ['132']}; {'id': '132', 'type': 'call', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'string', 'children': [], 'value': "'Skipping activation with missing affected agent'"}; {'id': '138', 'type': 'continue_statement', 'children': []}; {'id': '139', 'type': 'expression_statement', 'children': ['140']}; {'id': '140', 'type': 'assignment', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '142', 'type': 'call', 'children': ['143', '148']}; {'id': '143', 'type': 'attribute', 'children': ['144', '147']}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '150', 'type': 'if_statement', 'children': ['151', '154']}; {'id': '151', 'type': 'comparison_operator', 'children': ['152', '153'], 'value': 'is'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '153', 'type': 'None', 'children': []}; {'id': '154', 'type': 'block', 'children': ['155', '162']}; {'id': '155', 'type': 'expression_statement', 'children': ['156']}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'string', 'children': [], 'value': "'Skipping activation with missing affected agent'"}; {'id': '162', 'type': 'continue_statement', 'children': []}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'assignment', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '166', 'type': 'call', 'children': ['167', '170']}; {'id': '167', 'type': 'attribute', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '170', 'type': 'argument_list', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '173', 'type': 'if_statement', 'children': ['174', '177']}; {'id': '174', 'type': 'comparison_operator', 'children': ['175', '176'], 'value': 'is'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '176', 'type': 'None', 'children': []}; {'id': '177', 'type': 'block', 'children': ['178', '185']}; {'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': 'logger'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '183', 'type': 'argument_list', 'children': ['184']}; {'id': '184', 'type': 'string', 'children': [], 'value': "'Skipping activation with missing affected agent'"}; {'id': '185', 'type': 'continue_statement', 'children': []}; {'id': '186', 'type': 'expression_statement', 'children': ['187']}; {'id': '187', 'type': 'assignment', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '189', 'type': 'True', 'children': []}; {'id': '190', 'type': 'if_statement', 'children': ['191', '196', '209', '232']}; {'id': '191', 'type': 'call', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': '_is_type'}; {'id': '193', 'type': 'argument_list', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '195', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVATE'"}; {'id': '196', 'type': 'block', 'children': ['197']}; {'id': '197', 'type': 'expression_statement', 'children': ['198']}; {'id': '198', 'type': 'call', 'children': ['199', '202']}; {'id': '199', 'type': 'attribute', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '202', 'type': 'argument_list', 'children': ['203', '204']}; {'id': '203', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVATE'"}; {'id': '204', 'type': 'subscript', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '208', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '209', 'type': 'elif_clause', 'children': ['210', '215']}; {'id': '210', 'type': 'call', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': '_is_type'}; {'id': '212', 'type': 'argument_list', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '214', 'type': 'string', 'children': [], 'value': "'ONT::INHIBIT'"}; {'id': '215', 'type': 'block', 'children': ['216', '220']}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'assignment', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '219', 'type': 'False', 'children': []}; {'id': '220', 'type': 'expression_statement', 'children': ['221']}; {'id': '221', 'type': 'call', 'children': ['222', '225']}; {'id': '222', 'type': 'attribute', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '225', 'type': 'argument_list', 'children': ['226', '227']}; {'id': '226', 'type': 'string', 'children': [], 'value': "'ONT::INHIBIT'"}; {'id': '227', 'type': 'subscript', 'children': ['228', '231']}; {'id': '228', 'type': 'attribute', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '231', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '232', 'type': 'elif_clause', 'children': ['233', '238']}; {'id': '233', 'type': 'call', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': '_is_type'}; {'id': '235', 'type': 'argument_list', 'children': ['236', '237']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '237', 'type': 'string', 'children': [], 'value': "'ONT::DEACTIVATE'"}; {'id': '238', 'type': 'block', 'children': ['239', '243']}; {'id': '239', 'type': 'expression_statement', 'children': ['240']}; {'id': '240', 'type': 'assignment', 'children': ['241', '242']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '242', 'type': 'False', 'children': []}; {'id': '243', 'type': 'expression_statement', 'children': ['244']}; {'id': '244', 'type': 'call', 'children': ['245', '248']}; {'id': '245', 'type': 'attribute', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '250']}; {'id': '249', 'type': 'string', 'children': [], 'value': "'ONT::DEACTIVATE'"}; {'id': '250', 'type': 'subscript', 'children': ['251', '254']}; {'id': '251', 'type': 'attribute', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '254', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '255', 'type': 'expression_statement', 'children': ['256']}; {'id': '256', 'type': 'assignment', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '258', 'type': 'call', 'children': ['259', '262']}; {'id': '259', 'type': 'attribute', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '262', 'type': 'argument_list', 'children': ['263']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '264', 'type': 'expression_statement', 'children': ['265']}; {'id': '265', 'type': 'assignment', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '267', 'type': 'call', 'children': ['268', '271']}; {'id': '268', 'type': 'attribute', 'children': ['269', '270']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '270', 'type': 'identifier', 'children': [], 'value': '_get_event_location'}; {'id': '271', 'type': 'argument_list', 'children': ['272']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '273', 'type': 'for_statement', 'children': ['274', '277', '283']}; {'id': '274', 'type': 'pattern_list', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '277', 'type': 'call', 'children': ['278', '279']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '279', 'type': 'argument_list', 'children': ['280']}; {'id': '280', 'type': 'tuple', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'activator_agent'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '283', 'type': 'block', 'children': ['284', '319', '325']}; {'id': '284', 'type': 'if_statement', 'children': ['285', '286', '302']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '286', 'type': 'block', 'children': ['287']}; {'id': '287', 'type': 'expression_statement', 'children': ['288']}; {'id': '288', 'type': 'assignment', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '290', 'type': 'call', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'Activation'}; {'id': '292', 'type': 'argument_list', 'children': ['293', '294', '295']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '295', 'type': 'keyword_argument', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '297', 'type': 'list', 'children': ['298'], 'value': '[deepcopy(ev)]'}; {'id': '298', 'type': 'call', 'children': ['299', '300']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '300', 'type': 'argument_list', 'children': ['301']}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '302', 'type': 'else_clause', 'children': ['303']}; {'id': '303', 'type': 'block', 'children': ['304']}; {'id': '304', 'type': 'expression_statement', 'children': ['305']}; {'id': '305', 'type': 'assignment', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '307', 'type': 'call', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'Inhibition'}; {'id': '309', 'type': 'argument_list', 'children': ['310', '311', '312']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '312', 'type': 'keyword_argument', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '314', 'type': 'list', 'children': ['315'], 'value': '[deepcopy(ev)]'}; {'id': '315', 'type': 'call', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '317', 'type': 'argument_list', 'children': ['318']}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '319', 'type': 'expression_statement', 'children': ['320']}; {'id': '320', 'type': 'call', 'children': ['321', '322']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '322', 'type': 'argument_list', 'children': ['323', '324']}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '325', 'type': 'expression_statement', 'children': ['326']}; {'id': '326', 'type': 'call', 'children': ['327', '332']}; {'id': '327', 'type': 'attribute', 'children': ['328', '331']}; {'id': '328', 'type': 'attribute', 'children': ['329', '330']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '332', 'type': 'argument_list', 'children': ['333']}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'st'}
Extract direct Activation INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_activations_causal'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'ccs'}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"CC/[type=\'ONT::CAUSE\']"'}; {'id': '17', 'type': 'for_statement', 'children': ['18', '19', '20']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'ccs'}; {'id': '20', 'type': 'block', 'children': ['21', '30', '39', '49', '60', '73', '84', '97', '107', '116', '129', '139', '145', '154', '160', '169', '177', '186']}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'factor'}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'string', 'children': [], 'value': '"arg/[@role=\':FACTOR\']"'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'string', 'children': [], 'value': '"arg/[@role=\':OUTCOME\']"'}; {'id': '39', 'type': 'if_statement', 'children': ['40', '47']}; {'id': '40', 'type': 'boolean_operator', 'children': ['41', '44'], 'value': 'or'}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': 'is'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'factor'}; {'id': '43', 'type': 'None', 'children': []}; {'id': '44', 'type': 'comparison_operator', 'children': ['45', '46'], 'value': 'is'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '46', 'type': 'None', 'children': []}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'continue_statement', 'children': []}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'factor_id'}; {'id': '52', 'type': 'call', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'factor'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'factor_term'}; {'id': '63', 'type': 'call', 'children': ['64', '69']}; {'id': '64', 'type': 'attribute', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'binary_operator', 'children': ['71', '72'], 'value': '%'}; {'id': '71', 'type': 'string', 'children': [], 'value': '"TERM/[@id=\'%s\']"'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'factor_id'}; {'id': '73', 'type': 'expression_statement', 'children': ['74']}; {'id': '74', 'type': 'assignment', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '76', 'type': 'call', 'children': ['77', '82']}; {'id': '77', 'type': 'attribute', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '87', 'type': 'call', 'children': ['88', '93']}; {'id': '88', 'type': 'attribute', 'children': ['89', '92']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'binary_operator', 'children': ['95', '96'], 'value': '%'}; {'id': '95', 'type': 'string', 'children': [], 'value': '"EVENT/[@id=\'%s\']"'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '97', 'type': 'if_statement', 'children': ['98', '105']}; {'id': '98', 'type': 'boolean_operator', 'children': ['99', '102'], 'value': 'or'}; {'id': '99', 'type': 'comparison_operator', 'children': ['100', '101'], 'value': 'is'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'factor_term'}; {'id': '101', 'type': 'None', 'children': []}; {'id': '102', 'type': 'comparison_operator', 'children': ['103', '104'], 'value': 'is'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '104', 'type': 'None', 'children': []}; {'id': '105', 'type': 'block', 'children': ['106']}; {'id': '106', 'type': 'continue_statement', 'children': []}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'factor_term_type'}; {'id': '110', 'type': 'call', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'factor_term'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '114', 'type': 'argument_list', 'children': ['115']}; {'id': '115', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '116', 'type': 'if_statement', 'children': ['117', '127']}; {'id': '117', 'type': 'boolean_operator', 'children': ['118', '121', '122'], 'value': 'or'}; {'id': '118', 'type': 'comparison_operator', 'children': ['119', '120'], 'value': 'is'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'factor_term_type'}; {'id': '120', 'type': 'None', 'children': []}; {'id': '121', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '122', 'type': 'comparison_operator', 'children': ['123', '126'], 'value': 'not'}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'factor_term_type'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'molecule_types'}; {'id': '127', 'type': 'block', 'children': ['128']}; {'id': '128', 'type': 'continue_statement', 'children': []}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'assignment', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'factor_agent'}; {'id': '132', 'type': 'call', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '136', 'type': 'argument_list', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'factor_id'}; {'id': '138', 'type': 'None', 'children': []}; {'id': '139', 'type': 'if_statement', 'children': ['140', '143']}; {'id': '140', 'type': 'comparison_operator', 'children': ['141', '142'], 'value': 'is'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'factor_agent'}; {'id': '142', 'type': 'None', 'children': []}; {'id': '143', 'type': 'block', 'children': ['144']}; {'id': '144', 'type': 'continue_statement', 'children': []}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'assignment', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '148', 'type': 'call', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '152', 'type': 'argument_list', 'children': ['153']}; {'id': '153', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '154', 'type': 'if_statement', 'children': ['155', '158']}; {'id': '155', 'type': 'comparison_operator', 'children': ['156', '157'], 'value': 'is'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '157', 'type': 'None', 'children': []}; {'id': '158', 'type': 'block', 'children': ['159']}; {'id': '159', 'type': 'continue_statement', 'children': []}; {'id': '160', 'type': 'expression_statement', 'children': ['161']}; {'id': '161', 'type': 'assignment', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '163', 'type': 'call', 'children': ['164', '167']}; {'id': '164', 'type': 'attribute', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '167', 'type': 'argument_list', 'children': ['168']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'assignment', 'children': ['171', '176']}; {'id': '171', 'type': 'subscript', 'children': ['172', '175']}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'direct'"}; {'id': '176', 'type': 'False', 'children': []}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '180', 'type': 'call', 'children': ['181', '184']}; {'id': '181', 'type': 'attribute', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': '_get_event_location'}; {'id': '184', 'type': 'argument_list', 'children': ['185']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '186', 'type': 'if_statement', 'children': ['187', '195']}; {'id': '187', 'type': 'comparison_operator', 'children': ['188', '191'], 'value': 'in'}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '191', 'type': 'list', 'children': ['192', '193', '194'], 'value': "['ONT::ACTIVATE', 'ONT::ACTIVITY',\n 'ONT::DEACTIVATE']"}; {'id': '192', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVATE'"}; {'id': '193', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVITY'"}; {'id': '194', 'type': 'string', 'children': [], 'value': "'ONT::DEACTIVATE'"}; {'id': '195', 'type': 'block', 'children': ['196', '230', '247', '261', '267', '284']}; {'id': '196', 'type': 'if_statement', 'children': ['197', '204', '214']}; {'id': '197', 'type': 'comparison_operator', 'children': ['198', '201'], 'value': 'in'}; {'id': '198', 'type': 'attribute', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '201', 'type': 'list', 'children': ['202', '203'], 'value': "['ONT::ACTIVATE',\n 'ONT::DEACTIVATE']"}; {'id': '202', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVATE'"}; {'id': '203', 'type': 'string', 'children': [], 'value': "'ONT::DEACTIVATE'"}; {'id': '204', 'type': 'block', 'children': ['205']}; {'id': '205', 'type': 'expression_statement', 'children': ['206']}; {'id': '206', 'type': 'assignment', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '208', 'type': 'call', 'children': ['209', '212']}; {'id': '209', 'type': 'attribute', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '212', 'type': 'argument_list', 'children': ['213']}; {'id': '213', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '214', 'type': 'elif_clause', 'children': ['215', '220']}; {'id': '215', 'type': 'comparison_operator', 'children': ['216', '219'], 'value': '=='}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '219', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVITY'"}; {'id': '220', 'type': 'block', 'children': ['221']}; {'id': '221', 'type': 'expression_statement', 'children': ['222']}; {'id': '222', 'type': 'assignment', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '224', 'type': 'call', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '228', 'type': 'argument_list', 'children': ['229']}; {'id': '229', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AGENT\']"'}; {'id': '230', 'type': 'if_statement', 'children': ['231', '245']}; {'id': '231', 'type': 'boolean_operator', 'children': ['232', '235'], 'value': 'or'}; {'id': '232', 'type': 'comparison_operator', 'children': ['233', '234'], 'value': 'is'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '234', 'type': 'None', 'children': []}; {'id': '235', 'type': 'comparison_operator', 'children': ['236', '244'], 'value': 'is'}; {'id': '236', 'type': 'call', 'children': ['237', '242']}; {'id': '237', 'type': 'attribute', 'children': ['238', '241']}; {'id': '238', 'type': 'attribute', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '242', 'type': 'argument_list', 'children': ['243']}; {'id': '243', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '244', 'type': 'None', 'children': []}; {'id': '245', 'type': 'block', 'children': ['246']}; {'id': '246', 'type': 'continue_statement', 'children': []}; {'id': '247', 'type': 'expression_statement', 'children': ['248']}; {'id': '248', 'type': 'assignment', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'outcome_agent'}; {'id': '250', 'type': 'call', 'children': ['251', '254']}; {'id': '251', 'type': 'attribute', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '254', 'type': 'argument_list', 'children': ['255', '260']}; {'id': '255', 'type': 'subscript', 'children': ['256', '259']}; {'id': '256', 'type': 'attribute', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '259', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '261', 'type': 'if_statement', 'children': ['262', '265']}; {'id': '262', 'type': 'comparison_operator', 'children': ['263', '264'], 'value': 'is'}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'outcome_agent'}; {'id': '264', 'type': 'None', 'children': []}; {'id': '265', 'type': 'block', 'children': ['266']}; {'id': '266', 'type': 'continue_statement', 'children': []}; {'id': '267', 'type': 'if_statement', 'children': ['268', '273', '278']}; {'id': '268', 'type': 'comparison_operator', 'children': ['269', '272'], 'value': '=='}; {'id': '269', 'type': 'attribute', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'outcome_event_type'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '272', 'type': 'string', 'children': [], 'value': "'ONT::DEACTIVATE'"}; {'id': '273', 'type': 'block', 'children': ['274']}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'assignment', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '277', 'type': 'False', 'children': []}; {'id': '278', 'type': 'else_clause', 'children': ['279']}; {'id': '279', 'type': 'block', 'children': ['280']}; {'id': '280', 'type': 'expression_statement', 'children': ['281']}; {'id': '281', 'type': 'assignment', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '283', 'type': 'True', 'children': []}; {'id': '284', 'type': 'for_statement', 'children': ['285', '288', '294']}; {'id': '285', 'type': 'pattern_list', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '288', 'type': 'call', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'tuple', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'factor_agent'}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'outcome_agent'}; {'id': '294', 'type': 'block', 'children': ['295', '330', '336']}; {'id': '295', 'type': 'if_statement', 'children': ['296', '297', '313']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'is_activation'}; {'id': '297', 'type': 'block', 'children': ['298']}; {'id': '298', 'type': 'expression_statement', 'children': ['299']}; {'id': '299', 'type': 'assignment', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '301', 'type': 'call', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'Activation'}; {'id': '303', 'type': 'argument_list', 'children': ['304', '305', '306']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '306', 'type': 'keyword_argument', 'children': ['307', '308']}; {'id': '307', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '308', 'type': 'list', 'children': ['309'], 'value': '[deepcopy(ev)]'}; {'id': '309', 'type': 'call', 'children': ['310', '311']}; {'id': '310', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '311', 'type': 'argument_list', 'children': ['312']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '313', 'type': 'else_clause', 'children': ['314']}; {'id': '314', 'type': 'block', 'children': ['315']}; {'id': '315', 'type': 'expression_statement', 'children': ['316']}; {'id': '316', 'type': 'assignment', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '318', 'type': 'call', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'Inhibition'}; {'id': '320', 'type': 'argument_list', 'children': ['321', '322', '323']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '323', 'type': 'keyword_argument', 'children': ['324', '325']}; {'id': '324', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '325', 'type': 'list', 'children': ['326'], 'value': '[deepcopy(ev)]'}; {'id': '326', 'type': 'call', 'children': ['327', '328']}; {'id': '327', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '328', 'type': 'argument_list', 'children': ['329']}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '330', 'type': 'expression_statement', 'children': ['331']}; {'id': '331', 'type': 'call', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '333', 'type': 'argument_list', 'children': ['334', '335']}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '336', 'type': 'expression_statement', 'children': ['337']}; {'id': '337', 'type': 'call', 'children': ['338', '343']}; {'id': '338', 'type': 'attribute', 'children': ['339', '342']}; {'id': '339', 'type': 'attribute', 'children': ['340', '341']}; {'id': '340', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '343', 'type': 'argument_list', 'children': ['344']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'st'}
Extract causal Activation INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_activations_stimulate'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'stim_events'}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::STIMULATE\']"'}; {'id': '17', 'type': 'for_statement', 'children': ['18', '19', '20']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'stim_events'}; {'id': '20', 'type': 'block', 'children': ['21', '32', '40', '49', '58', '68', '79', '92', '103', '116', '126', '135', '148', '158', '164', '173', '179', '188', '196', '205']}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '24', 'type': 'call', 'children': ['25', '30']}; {'id': '25', 'type': 'attribute', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '32', 'type': 'if_statement', 'children': ['33', '38']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '35'], 'value': 'in'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': '_static_events'}; {'id': '38', 'type': 'block', 'children': ['39']}; {'id': '39', 'type': 'continue_statement', 'children': []}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'string', 'children': [], 'value': '"arg1/[@role=\':AGENT\']"'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '52', 'type': 'call', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'string', 'children': [], 'value': '"arg2/[@role=\':AFFECTED\']"'}; {'id': '58', 'type': 'if_statement', 'children': ['59', '66']}; {'id': '59', 'type': 'boolean_operator', 'children': ['60', '63'], 'value': 'or'}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '62'], 'value': 'is'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '62', 'type': 'None', 'children': []}; {'id': '63', 'type': 'comparison_operator', 'children': ['64', '65'], 'value': 'is'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '65', 'type': 'None', 'children': []}; {'id': '66', 'type': 'block', 'children': ['67']}; {'id': '67', 'type': 'continue_statement', 'children': []}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'controller_id'}; {'id': '71', 'type': 'call', 'children': ['72', '77']}; {'id': '72', 'type': 'attribute', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'controller_term'}; {'id': '82', 'type': 'call', 'children': ['83', '88']}; {'id': '83', 'type': 'attribute', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '88', 'type': 'argument_list', 'children': ['89']}; {'id': '89', 'type': 'binary_operator', 'children': ['90', '91'], 'value': '%'}; {'id': '90', 'type': 'string', 'children': [], 'value': '"TERM/[@id=\'%s\']"'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'controller_id'}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'assignment', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '95', 'type': 'call', 'children': ['96', '101']}; {'id': '96', 'type': 'attribute', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '106', 'type': 'call', 'children': ['107', '112']}; {'id': '107', 'type': 'attribute', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '112', 'type': 'argument_list', 'children': ['113']}; {'id': '113', 'type': 'binary_operator', 'children': ['114', '115'], 'value': '%'}; {'id': '114', 'type': 'string', 'children': [], 'value': '"EVENT/[@id=\'%s\']"'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '116', 'type': 'if_statement', 'children': ['117', '124']}; {'id': '117', 'type': 'boolean_operator', 'children': ['118', '121'], 'value': 'or'}; {'id': '118', 'type': 'comparison_operator', 'children': ['119', '120'], 'value': 'is'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'controller_term'}; {'id': '120', 'type': 'None', 'children': []}; {'id': '121', 'type': 'comparison_operator', 'children': ['122', '123'], 'value': 'is'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '123', 'type': 'None', 'children': []}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'continue_statement', 'children': []}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'assignment', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'controller_term_type'}; {'id': '129', 'type': 'call', 'children': ['130', '133']}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'controller_term'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '133', 'type': 'argument_list', 'children': ['134']}; {'id': '134', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '135', 'type': 'if_statement', 'children': ['136', '146']}; {'id': '136', 'type': 'boolean_operator', 'children': ['137', '140', '141'], 'value': 'or'}; {'id': '137', 'type': 'comparison_operator', 'children': ['138', '139'], 'value': 'is'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'controller_term_type'}; {'id': '139', 'type': 'None', 'children': []}; {'id': '140', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '141', 'type': 'comparison_operator', 'children': ['142', '145'], 'value': 'not'}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'controller_term_type'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'molecule_types'}; {'id': '146', 'type': 'block', 'children': ['147']}; {'id': '147', 'type': 'continue_statement', 'children': []}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '151', 'type': 'call', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '155', 'type': 'argument_list', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'controller_id'}; {'id': '157', 'type': 'None', 'children': []}; {'id': '158', 'type': 'if_statement', 'children': ['159', '162']}; {'id': '159', 'type': 'comparison_operator', 'children': ['160', '161'], 'value': 'is'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '161', 'type': 'None', 'children': []}; {'id': '162', 'type': 'block', 'children': ['163']}; {'id': '163', 'type': 'continue_statement', 'children': []}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'assignment', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'affected_event_type'}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '171', 'type': 'argument_list', 'children': ['172']}; {'id': '172', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '173', 'type': 'if_statement', 'children': ['174', '177']}; {'id': '174', 'type': 'comparison_operator', 'children': ['175', '176'], 'value': 'is'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'affected_event_type'}; {'id': '176', 'type': 'None', 'children': []}; {'id': '177', 'type': 'block', 'children': ['178']}; {'id': '178', 'type': 'continue_statement', 'children': []}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '182', 'type': 'call', 'children': ['183', '186']}; {'id': '183', 'type': 'attribute', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '186', 'type': 'argument_list', 'children': ['187']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '188', 'type': 'expression_statement', 'children': ['189']}; {'id': '189', 'type': 'assignment', 'children': ['190', '195']}; {'id': '190', 'type': 'subscript', 'children': ['191', '194']}; {'id': '191', 'type': 'attribute', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '194', 'type': 'string', 'children': [], 'value': "'direct'"}; {'id': '195', 'type': 'False', 'children': []}; {'id': '196', 'type': 'expression_statement', 'children': ['197']}; {'id': '197', 'type': 'assignment', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': '_get_event_location'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '205', 'type': 'if_statement', 'children': ['206', '211', '288']}; {'id': '206', 'type': 'comparison_operator', 'children': ['207', '210'], 'value': '=='}; {'id': '207', 'type': 'attribute', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'affected_event_type'}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '210', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVATE'"}; {'id': '211', 'type': 'block', 'children': ['212', '221', '227', '241', '247']}; {'id': '212', 'type': 'expression_statement', 'children': ['213']}; {'id': '213', 'type': 'assignment', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '215', 'type': 'call', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '221', 'type': 'if_statement', 'children': ['222', '225']}; {'id': '222', 'type': 'comparison_operator', 'children': ['223', '224'], 'value': 'is'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '224', 'type': 'None', 'children': []}; {'id': '225', 'type': 'block', 'children': ['226']}; {'id': '226', 'type': 'continue_statement', 'children': []}; {'id': '227', 'type': 'expression_statement', 'children': ['228']}; {'id': '228', 'type': 'assignment', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '230', 'type': 'call', 'children': ['231', '234']}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '234', 'type': 'argument_list', 'children': ['235', '240']}; {'id': '235', 'type': 'subscript', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '239', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '241', 'type': 'if_statement', 'children': ['242', '245']}; {'id': '242', 'type': 'comparison_operator', 'children': ['243', '244'], 'value': 'is'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '244', 'type': 'None', 'children': []}; {'id': '245', 'type': 'block', 'children': ['246']}; {'id': '246', 'type': 'continue_statement', 'children': []}; {'id': '247', 'type': 'for_statement', 'children': ['248', '251', '257']}; {'id': '248', 'type': 'pattern_list', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '251', 'type': 'call', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '253', 'type': 'argument_list', 'children': ['254']}; {'id': '254', 'type': 'tuple', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '257', 'type': 'block', 'children': ['258', '273', '279']}; {'id': '258', 'type': 'expression_statement', 'children': ['259']}; {'id': '259', 'type': 'assignment', 'children': ['260', '261']}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '261', 'type': 'call', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'Activation'}; {'id': '263', 'type': 'argument_list', 'children': ['264', '265', '266']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '266', 'type': 'keyword_argument', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '268', 'type': 'list', 'children': ['269'], 'value': '[deepcopy(ev)]'}; {'id': '269', 'type': 'call', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '271', 'type': 'argument_list', 'children': ['272']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '273', 'type': 'expression_statement', 'children': ['274']}; {'id': '274', 'type': 'call', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '276', 'type': 'argument_list', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '279', 'type': 'expression_statement', 'children': ['280']}; {'id': '280', 'type': 'call', 'children': ['281', '286']}; {'id': '281', 'type': 'attribute', 'children': ['282', '285']}; {'id': '282', 'type': 'attribute', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '286', 'type': 'argument_list', 'children': ['287']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '288', 'type': 'elif_clause', 'children': ['289', '294']}; {'id': '289', 'type': 'comparison_operator', 'children': ['290', '293'], 'value': '=='}; {'id': '290', 'type': 'attribute', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'affected_event_type'}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '293', 'type': 'string', 'children': [], 'value': "'ONT::ACTIVITY'"}; {'id': '294', 'type': 'block', 'children': ['295', '304', '310', '324', '330']}; {'id': '295', 'type': 'expression_statement', 'children': ['296']}; {'id': '296', 'type': 'assignment', 'children': ['297', '298']}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '298', 'type': 'call', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '302', 'type': 'argument_list', 'children': ['303']}; {'id': '303', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AGENT\']"'}; {'id': '304', 'type': 'if_statement', 'children': ['305', '308']}; {'id': '305', 'type': 'comparison_operator', 'children': ['306', '307'], 'value': 'is'}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '307', 'type': 'None', 'children': []}; {'id': '308', 'type': 'block', 'children': ['309']}; {'id': '309', 'type': 'continue_statement', 'children': []}; {'id': '310', 'type': 'expression_statement', 'children': ['311']}; {'id': '311', 'type': 'assignment', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '313', 'type': 'call', 'children': ['314', '317']}; {'id': '314', 'type': 'attribute', 'children': ['315', '316']}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '316', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '317', 'type': 'argument_list', 'children': ['318', '323']}; {'id': '318', 'type': 'subscript', 'children': ['319', '322']}; {'id': '319', 'type': 'attribute', 'children': ['320', '321']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'agent_tag'}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '322', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '324', 'type': 'if_statement', 'children': ['325', '328']}; {'id': '325', 'type': 'comparison_operator', 'children': ['326', '327'], 'value': 'is'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '327', 'type': 'None', 'children': []}; {'id': '328', 'type': 'block', 'children': ['329']}; {'id': '329', 'type': 'continue_statement', 'children': []}; {'id': '330', 'type': 'for_statement', 'children': ['331', '334', '340']}; {'id': '331', 'type': 'pattern_list', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '333', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '334', 'type': 'call', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '336', 'type': 'argument_list', 'children': ['337']}; {'id': '337', 'type': 'tuple', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '340', 'type': 'block', 'children': ['341', '356', '362']}; {'id': '341', 'type': 'expression_statement', 'children': ['342']}; {'id': '342', 'type': 'assignment', 'children': ['343', '344']}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '344', 'type': 'call', 'children': ['345', '346']}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'Activation'}; {'id': '346', 'type': 'argument_list', 'children': ['347', '348', '349']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '349', 'type': 'keyword_argument', 'children': ['350', '351']}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '351', 'type': 'list', 'children': ['352'], 'value': '[deepcopy(ev)]'}; {'id': '352', 'type': 'call', 'children': ['353', '354']}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '354', 'type': 'argument_list', 'children': ['355']}; {'id': '355', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '356', 'type': 'expression_statement', 'children': ['357']}; {'id': '357', 'type': 'call', 'children': ['358', '359']}; {'id': '358', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '359', 'type': 'argument_list', 'children': ['360', '361']}; {'id': '360', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '362', 'type': 'expression_statement', 'children': ['363']}; {'id': '363', 'type': 'call', 'children': ['364', '369']}; {'id': '364', 'type': 'attribute', 'children': ['365', '368']}; {'id': '365', 'type': 'attribute', 'children': ['366', '367']}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '368', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '369', 'type': 'argument_list', 'children': ['370']}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'st'}
Extract Activation INDRA Statements via stimulation.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_degradations'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'deg_events'}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::CONSUME\']"'}; {'id': '17', 'type': 'for_statement', 'children': ['18', '19', '20']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'deg_events'}; {'id': '20', 'type': 'block', 'children': ['21', '33', '42', '59', '70', '83', '97', '110', '119', '166', '175', '184', '225']}; {'id': '21', 'type': 'if_statement', 'children': ['22', '31']}; {'id': '22', 'type': 'comparison_operator', 'children': ['23', '28'], 'value': 'in'}; {'id': '23', 'type': 'subscript', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '27', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': '_static_events'}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'continue_statement', 'children': []}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '42', 'type': 'if_statement', 'children': ['43', '46']}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '45'], 'value': 'is'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '45', 'type': 'None', 'children': []}; {'id': '46', 'type': 'block', 'children': ['47', '51', '58']}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '50', 'type': 'string', 'children': [], 'value': "'Skipping degradation event with no affected term.'"}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'call', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '58', 'type': 'continue_statement', 'children': []}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '62', 'type': 'call', 'children': ['63', '68']}; {'id': '63', 'type': 'attribute', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '70', 'type': 'if_statement', 'children': ['71', '74']}; {'id': '71', 'type': 'comparison_operator', 'children': ['72', '73'], 'value': 'is'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '73', 'type': 'None', 'children': []}; {'id': '74', 'type': 'block', 'children': ['75', '82']}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'call', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'string', 'children': [], 'value': "'Skipping degradation event with missing affected agent'"}; {'id': '82', 'type': 'continue_statement', 'children': []}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '86', 'type': 'call', 'children': ['87', '90']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '90', 'type': 'argument_list', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '92', 'type': 'subscript', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '96', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '97', 'type': 'if_statement', 'children': ['98', '101']}; {'id': '98', 'type': 'comparison_operator', 'children': ['99', '100'], 'value': 'is'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '100', 'type': 'None', 'children': []}; {'id': '101', 'type': 'block', 'children': ['102', '109']}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'call', 'children': ['104', '107']}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'string', 'children': [], 'value': "'Skipping degradation event with missing affected agent'"}; {'id': '109', 'type': 'continue_statement', 'children': []}; {'id': '110', 'type': 'expression_statement', 'children': ['111']}; {'id': '111', 'type': 'assignment', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '113', 'type': 'call', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '117', 'type': 'argument_list', 'children': ['118']}; {'id': '118', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AGENT\']"'}; {'id': '119', 'type': 'if_statement', 'children': ['120', '123', '128']}; {'id': '120', 'type': 'comparison_operator', 'children': ['121', '122'], 'value': 'is'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '122', 'type': 'None', 'children': []}; {'id': '123', 'type': 'block', 'children': ['124']}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'assignment', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'agent_agent'}; {'id': '127', 'type': 'None', 'children': []}; {'id': '128', 'type': 'else_clause', 'children': ['129']}; {'id': '129', 'type': 'block', 'children': ['130', '141']}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'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': 'agent'}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '139', 'type': 'argument_list', 'children': ['140']}; {'id': '140', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '141', 'type': 'if_statement', 'children': ['142', '145', '150']}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '144'], 'value': 'is'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'id': '144', 'type': 'None', 'children': []}; {'id': '145', 'type': 'block', 'children': ['146']}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'agent_agent'}; {'id': '149', 'type': 'None', 'children': []}; {'id': '150', 'type': 'else_clause', 'children': ['151']}; {'id': '151', 'type': 'block', 'children': ['152']}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'agent_agent'}; {'id': '155', 'type': 'call', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '159', 'type': 'argument_list', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'agent_id'}; {'id': '161', 'type': 'subscript', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '165', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '169', 'type': 'call', 'children': ['170', '173']}; {'id': '170', 'type': 'attribute', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '175', 'type': 'expression_statement', 'children': ['176']}; {'id': '176', 'type': 'assignment', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '178', 'type': 'call', 'children': ['179', '182']}; {'id': '179', 'type': 'attribute', 'children': ['180', '181']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': '_get_event_location'}; {'id': '182', 'type': 'argument_list', 'children': ['183']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '184', 'type': 'for_statement', 'children': ['185', '188', '189', '195']}; {'id': '185', 'type': 'pattern_list', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'subj'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '188', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '189', 'type': 'call', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '191', 'type': 'argument_list', 'children': ['192']}; {'id': '192', 'type': 'tuple', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'agent_agent'}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'affected_agent'}; {'id': '195', 'type': 'block', 'children': ['196', '210', '216']}; {'id': '196', 'type': 'expression_statement', 'children': ['197']}; {'id': '197', 'type': 'assignment', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '199', 'type': 'call', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'DecreaseAmount'}; {'id': '201', 'type': 'argument_list', 'children': ['202', '203', '204']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'subj'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '204', 'type': 'keyword_argument', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '206', 'type': 'call', 'children': ['207', '208']}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '208', 'type': 'argument_list', 'children': ['209']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '213', 'type': 'argument_list', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '216', 'type': 'expression_statement', 'children': ['217']}; {'id': '217', 'type': 'call', 'children': ['218', '223']}; {'id': '218', 'type': 'attribute', 'children': ['219', '222']}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '223', 'type': 'argument_list', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '225', 'type': 'expression_statement', 'children': ['226']}; {'id': '226', 'type': 'call', 'children': ['227', '230']}; {'id': '227', 'type': 'attribute', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '230', 'type': 'argument_list', 'children': ['231', '235']}; {'id': '231', 'type': 'call', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': '_get_type'}; {'id': '233', 'type': 'argument_list', 'children': ['234']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '235', 'type': 'subscript', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '239', 'type': 'string', 'children': [], 'value': "'id'"}
Extract Degradation INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_complexes'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17', '28']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'bind_events'}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::BIND\']"'}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'augmented_assignment', 'children': ['19', '20'], 'value': '+='}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'bind_events'}; {'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': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::INTERACT\']"'}; {'id': '28', 'type': 'for_statement', 'children': ['29', '30', '31']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'bind_events'}; {'id': '31', 'type': 'block', 'children': ['32', '44', '53', '62', '104', '146', '164', '182', '199', '201', '210', '219', '260']}; {'id': '32', 'type': 'if_statement', 'children': ['33', '42']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '39'], 'value': 'in'}; {'id': '34', 'type': 'subscript', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '38', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': '_static_events'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'continue_statement', 'children': []}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'string', 'children': [], 'value': '"arg1"'}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '60', 'type': 'argument_list', 'children': ['61']}; {'id': '61', 'type': 'string', 'children': [], 'value': '"arg2"'}; {'id': '62', 'type': 'if_statement', 'children': ['63', '70']}; {'id': '63', 'type': 'boolean_operator', 'children': ['64', '67'], 'value': 'and'}; {'id': '64', 'type': 'comparison_operator', 'children': ['65', '66'], 'value': 'is'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '66', 'type': 'None', 'children': []}; {'id': '67', 'type': 'comparison_operator', 'children': ['68', '69'], 'value': 'is'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '69', 'type': 'None', 'children': []}; {'id': '70', 'type': 'block', 'children': ['71', '83', '92', '98']}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'assignment', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'list'}; {'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': 'event'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '81', 'type': 'argument_list', 'children': ['82']}; {'id': '82', 'type': 'string', 'children': [], 'value': "'arg'"}; {'id': '83', 'type': 'if_statement', 'children': ['84', '90']}; {'id': '84', 'type': 'comparison_operator', 'children': ['85', '89'], 'value': '<'}; {'id': '85', 'type': 'call', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '89', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'continue_statement', 'children': []}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'assignment', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '95', 'type': 'subscript', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '97', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '101', 'type': 'subscript', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '103', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '104', 'type': 'if_statement', 'children': ['105', '137']}; {'id': '105', 'type': 'boolean_operator', 'children': ['106', '121', '122'], 'value': 'or'}; {'id': '106', 'type': '()', 'children': ['107']}; {'id': '107', 'type': 'boolean_operator', 'children': ['108', '111'], 'value': 'or'}; {'id': '108', 'type': 'comparison_operator', 'children': ['109', '110'], 'value': 'is'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '110', 'type': 'None', 'children': []}; {'id': '111', 'type': 'comparison_operator', 'children': ['112', '120'], 'value': 'is'}; {'id': '112', 'type': 'call', 'children': ['113', '118']}; {'id': '113', 'type': 'attribute', 'children': ['114', '117']}; {'id': '114', 'type': 'attribute', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '118', 'type': 'argument_list', 'children': ['119']}; {'id': '119', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '120', 'type': 'None', 'children': []}; {'id': '121', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '122', 'type': '()', 'children': ['123']}; {'id': '123', 'type': 'boolean_operator', 'children': ['124', '127'], 'value': 'or'}; {'id': '124', 'type': 'comparison_operator', 'children': ['125', '126'], 'value': 'is'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '126', 'type': 'None', 'children': []}; {'id': '127', 'type': 'comparison_operator', 'children': ['128', '136'], 'value': 'is'}; {'id': '128', 'type': 'call', 'children': ['129', '134']}; {'id': '129', 'type': 'attribute', 'children': ['130', '133']}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '136', 'type': 'None', 'children': []}; {'id': '137', 'type': 'block', 'children': ['138', '145']}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'call', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'string', 'children': [], 'value': "'Skipping complex with less than 2 members'"}; {'id': '145', 'type': 'continue_statement', 'children': []}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'agent1'}; {'id': '149', 'type': 'call', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '153', 'type': 'argument_list', 'children': ['154', '159']}; {'id': '154', 'type': 'subscript', 'children': ['155', '158']}; {'id': '155', 'type': 'attribute', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'arg1'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '158', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '159', 'type': 'subscript', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '163', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'assignment', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'agent2'}; {'id': '167', 'type': 'call', 'children': ['168', '171']}; {'id': '168', 'type': 'attribute', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '171', 'type': 'argument_list', 'children': ['172', '177']}; {'id': '172', 'type': 'subscript', 'children': ['173', '176']}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'arg2'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '176', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '177', 'type': 'subscript', 'children': ['178', '181']}; {'id': '178', 'type': 'attribute', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '181', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '182', 'type': 'if_statement', 'children': ['183', '190']}; {'id': '183', 'type': 'boolean_operator', 'children': ['184', '187'], 'value': 'or'}; {'id': '184', 'type': 'comparison_operator', 'children': ['185', '186'], 'value': 'is'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'agent1'}; {'id': '186', 'type': 'None', 'children': []}; {'id': '187', 'type': 'comparison_operator', 'children': ['188', '189'], 'value': 'is'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'agent2'}; {'id': '189', 'type': 'None', 'children': []}; {'id': '190', 'type': 'block', 'children': ['191', '198']}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'call', 'children': ['193', '196']}; {'id': '193', 'type': 'attribute', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '196', 'type': 'argument_list', 'children': ['197']}; {'id': '197', 'type': 'string', 'children': [], 'value': "'Skipping complex with less than 2 members'"}; {'id': '198', 'type': 'continue_statement', 'children': []}; {'id': '199', 'type': 'expression_statement', 'children': ['200']}; {'id': '200', 'type': 'string', 'children': [], 'value': '\'\'\'\n site_feature = self._find_in_term(arg1.attrib[\'id\'], \'features/site\')\n if site_feature is not None:\n sites, positions = self._get_site_by_id(site_id)\n print sites, positions\n site_feature = self._find_in_term(arg2.attrib[\'id\'], \'features/site\')\n if site_feature is not None:\n sites, positions = self._get_site_by_id(site_id)\n print sites, positions\n site = event.find("site")\n if site is not None:\n sites, positions = self._get_site_by_id(site.attrib[\'id\'])\n print sites, positions\n \'\'\''}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'assignment', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '204', 'type': 'call', 'children': ['205', '208']}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': '_get_evidence'}; {'id': '208', 'type': 'argument_list', 'children': ['209']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'assignment', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '213', 'type': 'call', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': '_get_event_location'}; {'id': '217', 'type': 'argument_list', 'children': ['218']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '219', 'type': 'for_statement', 'children': ['220', '223', '229']}; {'id': '220', 'type': 'pattern_list', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '223', 'type': 'call', 'children': ['224', '225']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '225', 'type': 'argument_list', 'children': ['226']}; {'id': '226', 'type': 'tuple', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'agent1'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'agent2'}; {'id': '229', 'type': 'block', 'children': ['230', '245', '251']}; {'id': '230', 'type': 'expression_statement', 'children': ['231']}; {'id': '231', 'type': 'assignment', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '233', 'type': 'call', 'children': ['234', '235']}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'Complex'}; {'id': '235', 'type': 'argument_list', 'children': ['236', '239']}; {'id': '236', 'type': 'list', 'children': ['237', '238'], 'value': '[a1, a2]'}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'a1'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'a2'}; {'id': '239', 'type': 'keyword_argument', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '241', 'type': 'call', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '243', 'type': 'argument_list', 'children': ['244']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '245', 'type': 'expression_statement', 'children': ['246']}; {'id': '246', 'type': 'call', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': '_stmt_location_to_agents'}; {'id': '248', 'type': 'argument_list', 'children': ['249', '250']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '250', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '251', 'type': 'expression_statement', 'children': ['252']}; {'id': '252', 'type': 'call', 'children': ['253', '258']}; {'id': '253', 'type': 'attribute', 'children': ['254', '257']}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '258', 'type': 'argument_list', 'children': ['259']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '260', 'type': 'expression_statement', 'children': ['261']}; {'id': '261', 'type': 'call', 'children': ['262', '265']}; {'id': '262', 'type': 'attribute', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '265', 'type': 'argument_list', 'children': ['266', '270']}; {'id': '266', 'type': 'call', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': '_get_type'}; {'id': '268', 'type': 'argument_list', 'children': ['269']}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '270', 'type': 'subscript', 'children': ['271', '274']}; {'id': '271', 'type': 'attribute', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '274', 'type': 'string', 'children': [], 'value': "'id'"}
Extract Complex INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_modifications_indirect'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17', '22', '129', '236', '243', '250']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'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': 'ont_to_mod_type'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '16', 'type': 'argument_list', 'children': []}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'augmented_assignment', 'children': ['19', '20'], 'value': '+='}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '20', 'type': 'list', 'children': ['21'], 'value': "['ONT::PTM']"}; {'id': '21', 'type': 'string', 'children': [], 'value': "'ONT::PTM'"}; {'id': '22', 'type': 'function_definition', 'children': ['23', '24', '26']}; {'id': '23', 'type': 'function_name', 'children': [], 'value': 'get_increase_events'}; {'id': '24', 'type': 'parameters', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '26', 'type': 'block', 'children': ['27', '31', '42', '127']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '30', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '34', 'type': 'call', 'children': ['35', '40']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'string', 'children': [], 'value': '"EVENT/[type=\'ONT::INCREASE\']"'}; {'id': '42', 'type': 'for_statement', 'children': ['43', '44', '45']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'events'}; {'id': '45', 'type': 'block', 'children': ['46', '55', '61', '72', '77', '83', '94']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '49', 'type': 'call', 'children': ['50', '53']}; {'id': '50', 'type': 'attribute', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '55', 'type': 'if_statement', 'children': ['56', '59']}; {'id': '56', 'type': 'comparison_operator', 'children': ['57', '58'], 'value': 'is'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'affected'}; {'id': '58', 'type': 'None', 'children': []}; {'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': 'affected_id'}; {'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': 'affected'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '72', 'type': 'if_statement', 'children': ['73', '75']}; {'id': '73', 'type': 'not_operator', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '75', 'type': 'block', 'children': ['76']}; {'id': '76', 'type': 'continue_statement', 'children': []}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '80', 'type': 'binary_operator', 'children': ['81', '82'], 'value': '%'}; {'id': '81', 'type': 'string', 'children': [], 'value': '"EVENT/[@id=\'%s\']"'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '92', 'type': 'argument_list', 'children': ['93']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '94', 'type': 'if_statement', 'children': ['95', '98']}; {'id': '95', 'type': 'comparison_operator', 'children': ['96', '97'], 'value': 'is'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '97', 'type': 'None', 'children': []}; {'id': '98', 'type': 'block', 'children': ['99', '108']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'affected_type'}; {'id': '102', 'type': 'call', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '108', 'type': 'if_statement', 'children': ['109', '119']}; {'id': '109', 'type': 'boolean_operator', 'children': ['110', '113', '114'], 'value': 'and'}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112'], 'value': 'is'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'affected_type'}; {'id': '112', 'type': 'None', 'children': []}; {'id': '113', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '114', 'type': 'comparison_operator', 'children': ['115', '118'], 'value': 'in'}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'affected_type'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '119', 'type': 'block', 'children': ['120']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'call', 'children': ['122', '125']}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '125', 'type': 'argument_list', 'children': ['126']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '127', 'type': 'return_statement', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '129', 'type': 'function_definition', 'children': ['130', '131', '133']}; {'id': '130', 'type': 'function_name', 'children': [], 'value': 'get_cause_events'}; {'id': '131', 'type': 'parameters', 'children': ['132']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '133', 'type': 'block', 'children': ['134', '138', '149', '234']}; {'id': '134', 'type': 'expression_statement', 'children': ['135']}; {'id': '135', 'type': 'assignment', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '137', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'ccs'}; {'id': '141', 'type': 'call', 'children': ['142', '147']}; {'id': '142', 'type': 'attribute', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'findall'}; {'id': '147', 'type': 'argument_list', 'children': ['148']}; {'id': '148', 'type': 'string', 'children': [], 'value': '"CC/[type=\'ONT::CAUSE\']"'}; {'id': '149', 'type': 'for_statement', 'children': ['150', '151', '152']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'ccs'}; {'id': '152', 'type': 'block', 'children': ['153', '162', '168', '179', '184', '190', '201']}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'assignment', 'children': ['155', '156']}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '156', 'type': 'call', 'children': ['157', '160']}; {'id': '157', 'type': 'attribute', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'string', 'children': [], 'value': '".//*[@role=\':OUTCOME\']"'}; {'id': '162', 'type': 'if_statement', 'children': ['163', '166']}; {'id': '163', 'type': 'comparison_operator', 'children': ['164', '165'], 'value': 'is'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '165', 'type': 'None', 'children': []}; {'id': '166', 'type': 'block', 'children': ['167']}; {'id': '167', 'type': 'continue_statement', 'children': []}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'assignment', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '171', 'type': 'call', 'children': ['172', '177']}; {'id': '172', 'type': 'attribute', 'children': ['173', '176']}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'outcome'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '177', 'type': 'argument_list', 'children': ['178']}; {'id': '178', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '179', 'type': 'if_statement', 'children': ['180', '182']}; {'id': '180', 'type': 'not_operator', 'children': ['181']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '182', 'type': 'block', 'children': ['183']}; {'id': '183', 'type': 'continue_statement', 'children': []}; {'id': '184', 'type': 'expression_statement', 'children': ['185']}; {'id': '185', 'type': 'assignment', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '187', 'type': 'binary_operator', 'children': ['188', '189'], 'value': '%'}; {'id': '188', 'type': 'string', 'children': [], 'value': '"EVENT/[@id=\'%s\']"'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'outcome_id'}; {'id': '190', 'type': 'expression_statement', 'children': ['191']}; {'id': '191', 'type': 'assignment', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '193', 'type': 'call', 'children': ['194', '199']}; {'id': '194', 'type': 'attribute', 'children': ['195', '198']}; {'id': '195', 'type': 'attribute', 'children': ['196', '197']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '199', 'type': 'argument_list', 'children': ['200']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'pattern'}; {'id': '201', 'type': 'if_statement', 'children': ['202', '205']}; {'id': '202', 'type': 'comparison_operator', 'children': ['203', '204'], 'value': 'is'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '204', 'type': 'None', 'children': []}; {'id': '205', 'type': 'block', 'children': ['206', '215']}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'assignment', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'outcome_type'}; {'id': '209', 'type': 'call', 'children': ['210', '213']}; {'id': '210', 'type': 'attribute', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'outcome_event'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '213', 'type': 'argument_list', 'children': ['214']}; {'id': '214', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '215', 'type': 'if_statement', 'children': ['216', '226']}; {'id': '216', 'type': 'boolean_operator', 'children': ['217', '220', '221'], 'value': 'and'}; {'id': '217', 'type': 'comparison_operator', 'children': ['218', '219'], 'value': 'is'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'outcome_type'}; {'id': '219', 'type': 'None', 'children': []}; {'id': '220', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '221', 'type': 'comparison_operator', 'children': ['222', '225'], 'value': 'in'}; {'id': '222', 'type': 'attribute', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'outcome_type'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '226', 'type': 'block', 'children': ['227']}; {'id': '227', 'type': 'expression_statement', 'children': ['228']}; {'id': '228', 'type': 'call', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '232', 'type': 'argument_list', 'children': ['233']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'cc'}; {'id': '234', 'type': 'return_statement', 'children': ['235']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '236', 'type': 'expression_statement', 'children': ['237']}; {'id': '237', 'type': 'assignment', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '239', 'type': 'call', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'get_increase_events'}; {'id': '241', 'type': 'argument_list', 'children': ['242']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '243', 'type': 'expression_statement', 'children': ['244']}; {'id': '244', 'type': 'augmented_assignment', 'children': ['245', '246'], 'value': '+='}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '246', 'type': 'call', 'children': ['247', '248']}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'get_cause_events'}; {'id': '248', 'type': 'argument_list', 'children': ['249']}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'mod_event_types'}; {'id': '250', 'type': 'for_statement', 'children': ['251', '252', '253']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'mod_events'}; {'id': '253', 'type': 'block', 'children': ['254', '262', '270', '277', '286', '306', '317', '323', '333', '342', '362', '373', '378', '391', '397', '484', '496']}; {'id': '254', 'type': 'expression_statement', 'children': ['255']}; {'id': '255', 'type': 'assignment', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '257', 'type': 'subscript', 'children': ['258', '261']}; {'id': '258', 'type': 'attribute', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '261', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '262', 'type': 'if_statement', 'children': ['263', '268']}; {'id': '263', 'type': 'comparison_operator', 'children': ['264', '265'], 'value': 'in'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '265', 'type': 'attribute', 'children': ['266', '267']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': '_static_events'}; {'id': '268', 'type': 'block', 'children': ['269']}; {'id': '269', 'type': 'continue_statement', 'children': []}; {'id': '270', 'type': 'expression_statement', 'children': ['271']}; {'id': '271', 'type': 'assignment', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'event_type'}; {'id': '273', 'type': 'call', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': '_get_type'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '277', 'type': 'expression_statement', 'children': ['278']}; {'id': '278', 'type': 'assignment', 'children': ['279', '280']}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'enzyme'}; {'id': '280', 'type': 'call', 'children': ['281', '284']}; {'id': '281', 'type': 'attribute', 'children': ['282', '283']}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '284', 'type': 'argument_list', 'children': ['285']}; {'id': '285', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AGENT\']"'}; {'id': '286', 'type': 'if_statement', 'children': ['287', '290']}; {'id': '287', 'type': 'comparison_operator', 'children': ['288', '289'], 'value': 'is'}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'enzyme'}; {'id': '289', 'type': 'None', 'children': []}; {'id': '290', 'type': 'block', 'children': ['291', '300']}; {'id': '291', 'type': 'expression_statement', 'children': ['292']}; {'id': '292', 'type': 'assignment', 'children': ['293', '294']}; {'id': '293', 'type': 'identifier', 'children': [], 'value': 'enzyme'}; {'id': '294', 'type': 'call', 'children': ['295', '298']}; {'id': '295', 'type': 'attribute', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '298', 'type': 'argument_list', 'children': ['299']}; {'id': '299', 'type': 'string', 'children': [], 'value': '".//*[@role=\':FACTOR\']"'}; {'id': '300', 'type': 'if_statement', 'children': ['301', '304']}; {'id': '301', 'type': 'comparison_operator', 'children': ['302', '303'], 'value': 'is'}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'enzyme'}; {'id': '303', 'type': 'None', 'children': []}; {'id': '304', 'type': 'block', 'children': ['305']}; {'id': '305', 'type': 'return_statement', 'children': []}; {'id': '306', 'type': 'expression_statement', 'children': ['307']}; {'id': '307', 'type': 'assignment', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'enzyme_id'}; {'id': '309', 'type': 'call', 'children': ['310', '315']}; {'id': '310', 'type': 'attribute', 'children': ['311', '314']}; {'id': '311', 'type': 'attribute', 'children': ['312', '313']}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'enzyme'}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '315', 'type': 'argument_list', 'children': ['316']}; {'id': '316', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '317', 'type': 'if_statement', 'children': ['318', '321']}; {'id': '318', 'type': 'comparison_operator', 'children': ['319', '320'], 'value': 'is'}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'enzyme_id'}; {'id': '320', 'type': 'None', 'children': []}; {'id': '321', 'type': 'block', 'children': ['322']}; {'id': '322', 'type': 'continue_statement', 'children': []}; {'id': '323', 'type': 'expression_statement', 'children': ['324']}; {'id': '324', 'type': 'assignment', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'enzyme_agent'}; {'id': '326', 'type': 'call', 'children': ['327', '330']}; {'id': '327', 'type': 'attribute', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': '_get_agent_by_id'}; {'id': '330', 'type': 'argument_list', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'enzyme_id'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'event_id'}; {'id': '333', 'type': 'expression_statement', 'children': ['334']}; {'id': '334', 'type': 'assignment', 'children': ['335', '336']}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'affected_event_tag'}; {'id': '336', 'type': 'call', 'children': ['337', '340']}; {'id': '337', 'type': 'attribute', 'children': ['338', '339']}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '340', 'type': 'argument_list', 'children': ['341']}; {'id': '341', 'type': 'string', 'children': [], 'value': '".//*[@role=\':AFFECTED\']"'}; {'id': '342', 'type': 'if_statement', 'children': ['343', '346']}; {'id': '343', 'type': 'comparison_operator', 'children': ['344', '345'], 'value': 'is'}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'affected_event_tag'}; {'id': '345', 'type': 'None', 'children': []}; {'id': '346', 'type': 'block', 'children': ['347', '356']}; {'id': '347', 'type': 'expression_statement', 'children': ['348']}; {'id': '348', 'type': 'assignment', 'children': ['349', '350']}; {'id': '349', 'type': 'identifier', 'children': [], 'value': 'affected_event_tag'}; {'id': '350', 'type': 'call', 'children': ['351', '354']}; {'id': '351', 'type': 'attribute', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '353', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '354', 'type': 'argument_list', 'children': ['355']}; {'id': '355', 'type': 'string', 'children': [], 'value': '".//*[@role=\':OUTCOME\']"'}; {'id': '356', 'type': 'if_statement', 'children': ['357', '360']}; {'id': '357', 'type': 'comparison_operator', 'children': ['358', '359'], 'value': 'is'}; {'id': '358', 'type': 'identifier', 'children': [], 'value': 'affected_event_tag'}; {'id': '359', 'type': 'None', 'children': []}; {'id': '360', 'type': 'block', 'children': ['361']}; {'id': '361', 'type': 'return_statement', 'children': []}; {'id': '362', 'type': 'expression_statement', 'children': ['363']}; {'id': '363', 'type': 'assignment', 'children': ['364', '365']}; {'id': '364', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '365', 'type': 'call', 'children': ['366', '371']}; {'id': '366', 'type': 'attribute', 'children': ['367', '370']}; {'id': '367', 'type': 'attribute', 'children': ['368', '369']}; {'id': '368', 'type': 'identifier', 'children': [], 'value': 'affected_event_tag'}; {'id': '369', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '370', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '371', 'type': 'argument_list', 'children': ['372']}; {'id': '372', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '373', 'type': 'if_statement', 'children': ['374', '376']}; {'id': '374', 'type': 'not_operator', 'children': ['375']}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '376', 'type': 'block', 'children': ['377']}; {'id': '377', 'type': 'return_statement', 'children': []}; {'id': '378', 'type': 'expression_statement', 'children': ['379']}; {'id': '379', 'type': 'assignment', 'children': ['380', '381']}; {'id': '380', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '381', 'type': 'call', 'children': ['382', '387']}; {'id': '382', 'type': 'attribute', 'children': ['383', '386']}; {'id': '383', 'type': 'attribute', 'children': ['384', '385']}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '385', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '387', 'type': 'argument_list', 'children': ['388']}; {'id': '388', 'type': 'binary_operator', 'children': ['389', '390'], 'value': '%'}; {'id': '389', 'type': 'string', 'children': [], 'value': '"EVENT/[@id=\'%s\']"'}; {'id': '390', 'type': 'identifier', 'children': [], 'value': 'affected_id'}; {'id': '391', 'type': 'if_statement', 'children': ['392', '395']}; {'id': '392', 'type': 'comparison_operator', 'children': ['393', '394'], 'value': 'is'}; {'id': '393', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '394', 'type': 'None', 'children': []}; {'id': '395', 'type': 'block', 'children': ['396']}; {'id': '396', 'type': 'return_statement', 'children': []}; {'id': '397', 'type': 'for_statement', 'children': ['398', '399', '404']}; {'id': '398', 'type': 'identifier', 'children': [], 'value': 'enz_t'}; {'id': '399', 'type': 'call', 'children': ['400', '401']}; {'id': '400', 'type': 'identifier', 'children': [], 'value': '_agent_list_product'}; {'id': '401', 'type': 'argument_list', 'children': ['402']}; {'id': '402', 'type': 'tuple', 'children': ['403']}; {'id': '403', 'type': 'identifier', 'children': [], 'value': 'enzyme_agent'}; {'id': '404', 'type': 'block', 'children': ['405', '411', '420', '424', '451']}; {'id': '405', 'type': 'expression_statement', 'children': ['406']}; {'id': '406', 'type': 'assignment', 'children': ['407', '408']}; {'id': '407', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '408', 'type': 'subscript', 'children': ['409', '410']}; {'id': '409', 'type': 'identifier', 'children': [], 'value': 'enz_t'}; {'id': '410', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '411', 'type': 'expression_statement', 'children': ['412']}; {'id': '412', 'type': 'assignment', 'children': ['413', '414']}; {'id': '413', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '414', 'type': 'call', 'children': ['415', '418']}; {'id': '415', 'type': 'attribute', 'children': ['416', '417']}; {'id': '416', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '417', 'type': 'identifier', 'children': [], 'value': '_get_modification_event'}; {'id': '418', 'type': 'argument_list', 'children': ['419']}; {'id': '419', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '420', 'type': 'expression_statement', 'children': ['421']}; {'id': '421', 'type': 'assignment', 'children': ['422', '423']}; {'id': '422', 'type': 'identifier', 'children': [], 'value': 'stmts_to_make'}; {'id': '423', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '424', 'type': 'if_statement', 'children': ['425', '426']}; {'id': '425', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '426', 'type': 'block', 'children': ['427']}; {'id': '427', 'type': 'for_statement', 'children': ['428', '429', '430']}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '429', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '430', 'type': 'block', 'children': ['431']}; {'id': '431', 'type': 'if_statement', 'children': ['432', '443']}; {'id': '432', 'type': 'boolean_operator', 'children': ['433', '438'], 'value': 'and'}; {'id': '433', 'type': 'comparison_operator', 'children': ['434', '437'], 'value': 'is'}; {'id': '434', 'type': 'attribute', 'children': ['435', '436']}; {'id': '435', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '436', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '437', 'type': 'None', 'children': []}; {'id': '438', 'type': 'comparison_operator', 'children': ['439', '442'], 'value': 'is'}; {'id': '439', 'type': 'attribute', 'children': ['440', '441']}; {'id': '440', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '441', 'type': 'identifier', 'children': [], 'value': 'sub'}; {'id': '442', 'type': 'None', 'children': []}; {'id': '443', 'type': 'block', 'children': ['444']}; {'id': '444', 'type': 'expression_statement', 'children': ['445']}; {'id': '445', 'type': 'call', 'children': ['446', '449']}; {'id': '446', 'type': 'attribute', 'children': ['447', '448']}; {'id': '447', 'type': 'identifier', 'children': [], 'value': 'stmts_to_make'}; {'id': '448', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '449', 'type': 'argument_list', 'children': ['450']}; {'id': '450', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '451', 'type': 'for_statement', 'children': ['452', '453', '454']}; {'id': '452', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '453', 'type': 'identifier', 'children': [], 'value': 'stmts_to_make'}; {'id': '454', 'type': 'block', 'children': ['455', '461', '475']}; {'id': '455', 'type': 'expression_statement', 'children': ['456']}; {'id': '456', 'type': 'assignment', 'children': ['457', '460']}; {'id': '457', 'type': 'attribute', 'children': ['458', '459']}; {'id': '458', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '459', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '460', 'type': 'identifier', 'children': [], 'value': 'enz'}; {'id': '461', 'type': 'for_statement', 'children': ['462', '463', '466']}; {'id': '462', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '463', 'type': 'attribute', 'children': ['464', '465']}; {'id': '464', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '465', 'type': 'identifier', 'children': [], 'value': 'evidence'}; {'id': '466', 'type': 'block', 'children': ['467']}; {'id': '467', 'type': 'expression_statement', 'children': ['468']}; {'id': '468', 'type': 'assignment', 'children': ['469', '474']}; {'id': '469', 'type': 'subscript', 'children': ['470', '473']}; {'id': '470', 'type': 'attribute', 'children': ['471', '472']}; {'id': '471', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '472', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '473', 'type': 'string', 'children': [], 'value': "'direct'"}; {'id': '474', 'type': 'False', 'children': []}; {'id': '475', 'type': 'expression_statement', 'children': ['476']}; {'id': '476', 'type': 'call', 'children': ['477', '482']}; {'id': '477', 'type': 'attribute', 'children': ['478', '481']}; {'id': '478', 'type': 'attribute', 'children': ['479', '480']}; {'id': '479', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '480', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '481', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '482', 'type': 'argument_list', 'children': ['483']}; {'id': '483', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '484', 'type': 'expression_statement', 'children': ['485']}; {'id': '485', 'type': 'call', 'children': ['486', '489']}; {'id': '486', 'type': 'attribute', 'children': ['487', '488']}; {'id': '487', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '488', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '489', 'type': 'argument_list', 'children': ['490', '491']}; {'id': '490', 'type': 'identifier', 'children': [], 'value': 'event_type'}; {'id': '491', 'type': 'subscript', 'children': ['492', '495']}; {'id': '492', 'type': 'attribute', 'children': ['493', '494']}; {'id': '493', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '494', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '495', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '496', 'type': 'expression_statement', 'children': ['497']}; {'id': '497', 'type': 'call', 'children': ['498', '501']}; {'id': '498', 'type': 'attribute', 'children': ['499', '500']}; {'id': '499', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '500', 'type': 'identifier', 'children': [], 'value': '_add_extracted'}; {'id': '501', 'type': 'argument_list', 'children': ['502', '510']}; {'id': '502', 'type': 'attribute', 'children': ['503', '509']}; {'id': '503', 'type': 'call', 'children': ['504', '507']}; {'id': '504', 'type': 'attribute', 'children': ['505', '506']}; {'id': '505', 'type': 'identifier', 'children': [], 'value': 'affected_event'}; {'id': '506', 'type': 'identifier', 'children': [], 'value': 'find'}; {'id': '507', 'type': 'argument_list', 'children': ['508']}; {'id': '508', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '509', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '510', 'type': 'identifier', 'children': [], 'value': 'affected_id'}
Extract indirect Modification INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'replace_activities'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13', '17', '47', '53', '272']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'call', 'children': ['8', '11']}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'string', 'children': [], 'value': "'Running PySB Preassembler replace activities'"}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'new_stmts'}; {'id': '16', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '17', 'type': 'function_definition', 'children': ['18', '19', '21']}; {'id': '18', 'type': 'function_name', 'children': [], 'value': 'has_agent_activity'}; {'id': '19', 'type': 'parameters', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '21', 'type': 'block', 'children': ['22', '45']}; {'id': '22', 'type': 'for_statement', 'children': ['23', '24', '29']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'agent_list'}; {'id': '28', 'type': 'argument_list', 'children': []}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'if_statement', 'children': ['31', '42']}; {'id': '31', 'type': 'boolean_operator', 'children': ['32', '37'], 'value': 'and'}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '34', 'type': 'argument_list', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'Agent'}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '41'], 'value': 'is'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '41', 'type': 'None', 'children': []}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'return_statement', 'children': ['44']}; {'id': '44', 'type': 'True', 'children': []}; {'id': '45', 'type': 'return_statement', 'children': ['46']}; {'id': '46', 'type': 'False', 'children': []}; {'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': 'self'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': '_gather_active_forms'}; {'id': '52', 'type': 'argument_list', 'children': []}; {'id': '53', 'type': 'for_statement', 'children': ['54', '57', '63']}; {'id': '54', 'type': 'pattern_list', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'j'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '59', 'type': 'argument_list', 'children': ['60']}; {'id': '60', 'type': 'attribute', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '63', 'type': 'block', 'children': ['64', '83', '98', '106', '113', '121', '237', '247']}; {'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': 'logger'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'binary_operator', 'children': ['71', '72'], 'value': '%'}; {'id': '71', 'type': 'string', 'children': [], 'value': "'%d/%d %s'"}; {'id': '72', 'type': 'tuple', 'children': ['73', '76', '82']}; {'id': '73', 'type': 'binary_operator', 'children': ['74', '75'], 'value': '+'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'j'}; {'id': '75', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '76', 'type': 'call', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '78', 'type': 'argument_list', 'children': ['79']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '83', 'type': 'if_statement', 'children': ['84', '89']}; {'id': '84', 'type': 'not_operator', 'children': ['85']}; {'id': '85', 'type': 'call', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'has_agent_activity'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '89', 'type': 'block', 'children': ['90', '97']}; {'id': '90', 'type': 'expression_statement', 'children': ['91']}; {'id': '91', 'type': 'call', 'children': ['92', '95']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'new_stmts'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '97', 'type': 'continue_statement', 'children': []}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'stmt_agents'}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'agent_list'}; {'id': '105', 'type': 'argument_list', 'children': []}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'num_agents'}; {'id': '109', 'type': 'call', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'stmt_agents'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'agent_forms'}; {'id': '116', 'type': 'list_comprehension', 'children': ['117', '118']}; {'id': '117', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '118', 'type': 'for_in_clause', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'stmt_agents'}; {'id': '121', 'type': 'for_statement', 'children': ['122', '125', '129']}; {'id': '122', 'type': 'pattern_list', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '125', 'type': 'call', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '127', 'type': 'argument_list', 'children': ['128']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'stmt_agents'}; {'id': '129', 'type': 'block', 'children': ['130']}; {'id': '130', 'type': 'if_statement', 'children': ['131', '147', '226']}; {'id': '131', 'type': 'boolean_operator', 'children': ['132', '141', '142'], 'value': 'and'}; {'id': '132', 'type': 'boolean_operator', 'children': ['133', '136'], 'value': 'and'}; {'id': '133', 'type': 'comparison_operator', 'children': ['134', '135'], 'value': 'is'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '135', 'type': 'None', 'children': []}; {'id': '136', 'type': 'call', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '138', 'type': 'argument_list', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'Agent'}; {'id': '141', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '142', 'type': 'comparison_operator', 'children': ['143', '146'], 'value': 'is'}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '146', 'type': 'None', 'children': []}; {'id': '147', 'type': 'block', 'children': ['148', '159', '198']}; {'id': '148', 'type': 'expression_statement', 'children': ['149']}; {'id': '149', 'type': 'assignment', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '151', 'type': 'call', 'children': ['152', '157']}; {'id': '152', 'type': 'attribute', 'children': ['153', '156']}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'agent_set'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'get_create_base_agent'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '159', 'type': 'if_statement', 'children': ['160', '165', '181']}; {'id': '160', 'type': 'attribute', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'is_active'}; {'id': '165', 'type': 'block', 'children': ['166', '172']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '172', 'type': 'if_statement', 'children': ['173', '175']}; {'id': '173', 'type': 'not_operator', 'children': ['174']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'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': 'active_forms'}; {'id': '179', 'type': 'list', 'children': ['180'], 'value': '[agent]'}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '181', 'type': 'else_clause', 'children': ['182']}; {'id': '182', 'type': 'block', 'children': ['183', '189']}; {'id': '183', 'type': 'expression_statement', 'children': ['184']}; {'id': '184', 'type': 'assignment', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'inactive_forms'}; {'id': '189', 'type': 'if_statement', 'children': ['190', '192']}; {'id': '190', 'type': 'not_operator', 'children': ['191']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '192', 'type': 'block', 'children': ['193']}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '196', 'type': 'list', 'children': ['197'], 'value': '[agent]'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '198', 'type': 'for_statement', 'children': ['199', '200', '201']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'af'}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'active_forms'}; {'id': '201', 'type': 'block', 'children': ['202', '209', '217']}; {'id': '202', 'type': 'expression_statement', 'children': ['203']}; {'id': '203', 'type': 'assignment', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'new_agent'}; {'id': '205', 'type': 'call', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'fast_deepcopy'}; {'id': '207', 'type': 'argument_list', 'children': ['208']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '209', 'type': 'expression_statement', 'children': ['210']}; {'id': '210', 'type': 'call', 'children': ['211', '214']}; {'id': '211', 'type': 'attribute', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '213', 'type': 'identifier', 'children': [], 'value': '_set_agent_context'}; {'id': '214', 'type': 'argument_list', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'af'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'new_agent'}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'call', 'children': ['219', '224']}; {'id': '219', 'type': 'attribute', 'children': ['220', '223']}; {'id': '220', 'type': 'subscript', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'agent_forms'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '224', 'type': 'argument_list', 'children': ['225']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'new_agent'}; {'id': '226', 'type': 'else_clause', 'children': ['227']}; {'id': '227', 'type': 'block', 'children': ['228']}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'call', 'children': ['230', '235']}; {'id': '230', 'type': 'attribute', 'children': ['231', '234']}; {'id': '231', 'type': 'subscript', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'agent_forms'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '235', 'type': 'argument_list', 'children': ['236']}; {'id': '236', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '237', 'type': 'expression_statement', 'children': ['238']}; {'id': '238', 'type': 'assignment', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'agent_combs'}; {'id': '240', 'type': 'call', 'children': ['241', '244']}; {'id': '241', 'type': 'attribute', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'itertools'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'product'}; {'id': '244', 'type': 'argument_list', 'children': ['245']}; {'id': '245', 'type': 'list_splat', 'children': ['246']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'agent_forms'}; {'id': '247', 'type': 'for_statement', 'children': ['248', '249', '250']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'agent_comb'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'agent_combs'}; {'id': '250', 'type': 'block', 'children': ['251', '258', '265']}; {'id': '251', 'type': 'expression_statement', 'children': ['252']}; {'id': '252', 'type': 'assignment', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'new_stmt'}; {'id': '254', 'type': 'call', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'fast_deepcopy'}; {'id': '256', 'type': 'argument_list', 'children': ['257']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '258', 'type': 'expression_statement', 'children': ['259']}; {'id': '259', 'type': 'call', 'children': ['260', '263']}; {'id': '260', 'type': 'attribute', 'children': ['261', '262']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'new_stmt'}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'set_agent_list'}; {'id': '263', 'type': 'argument_list', 'children': ['264']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'agent_comb'}; {'id': '265', 'type': 'expression_statement', 'children': ['266']}; {'id': '266', 'type': 'call', 'children': ['267', '270']}; {'id': '267', 'type': 'attribute', 'children': ['268', '269']}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'new_stmts'}; {'id': '269', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '270', 'type': 'argument_list', 'children': ['271']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'new_stmt'}; {'id': '272', 'type': 'expression_statement', 'children': ['273']}; {'id': '273', 'type': 'assignment', 'children': ['274', '277']}; {'id': '274', 'type': 'attribute', 'children': ['275', '276']}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'new_stmts'}
Replace ative flags with Agent states when possible.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'score_evidence_list'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '6', 'type': 'block', 'children': ['7', '121', '139', '156', '163', '170', '179']}; {'id': '7', 'type': 'function_definition', 'children': ['8', '9', '11']}; {'id': '8', 'type': 'function_name', 'children': [], 'value': '_score'}; {'id': '9', 'type': 'parameters', 'children': ['10']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '11', 'type': 'block', 'children': ['12', '18', '28', '37', '53', '63', '89', '93', '113', '119']}; {'id': '12', 'type': 'if_statement', 'children': ['13', '15']}; {'id': '13', 'type': 'not_operator', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'return_statement', 'children': ['17']}; {'id': '17', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'sources'}; {'id': '21', 'type': 'list_comprehension', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'source_api'}; {'id': '25', 'type': 'for_in_clause', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'uniq_sources'}; {'id': '31', 'type': 'call', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'unique'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'sources'}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'syst_factors'}; {'id': '40', 'type': 'dictionary_comprehension', 'children': ['41', '50']}; {'id': '41', 'type': 'pair', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '43', 'type': 'subscript', 'children': ['44', '49']}; {'id': '44', 'type': 'subscript', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '48', 'type': 'string', 'children': [], 'value': "'syst'"}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '50', 'type': 'for_in_clause', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'uniq_sources'}; {'id': '53', 'type': 'expression_statement', 'children': ['54']}; {'id': '54', 'type': 'assignment', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'rand_factors'}; {'id': '56', 'type': 'dictionary_comprehension', 'children': ['57', '60']}; {'id': '57', 'type': 'pair', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '59', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '60', 'type': 'for_in_clause', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'uniq_sources'}; {'id': '63', 'type': 'for_statement', 'children': ['64', '65', '66']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '66', 'type': 'block', 'children': ['67']}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'call', 'children': ['69', '76']}; {'id': '69', 'type': 'attribute', 'children': ['70', '75']}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'rand_factors'}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'source_api'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'evidence_random_noise_prior'}; {'id': '79', 'type': 'argument_list', 'children': ['80', '81', '86']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '81', 'type': 'subscript', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '85', 'type': 'string', 'children': [], 'value': "'rand'"}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}; {'id': '89', 'type': 'expression_statement', 'children': ['90']}; {'id': '90', 'type': 'assignment', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'neg_prob_prior'}; {'id': '92', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '93', 'type': 'for_statement', 'children': ['94', '95', '96']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'uniq_sources'}; {'id': '96', 'type': 'block', 'children': ['97']}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'augmented_assignment', 'children': ['99', '100'], 'value': '*='}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'neg_prob_prior'}; {'id': '100', 'type': '()', 'children': ['101']}; {'id': '101', 'type': 'binary_operator', 'children': ['102', '105'], 'value': '+'}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'syst_factors'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '105', 'type': 'call', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'numpy'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'prod'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'subscript', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'rand_factors'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'prob_prior'}; {'id': '116', 'type': 'binary_operator', 'children': ['117', '118'], 'value': '-'}; {'id': '117', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'neg_prob_prior'}; {'id': '119', 'type': 'return_statement', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'prob_prior'}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'pos_evidence'}; {'id': '124', 'type': 'list_comprehension', 'children': ['125', '126', '129']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '126', 'type': 'for_in_clause', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '129', 'type': 'if_clause', 'children': ['130']}; {'id': '130', 'type': 'not_operator', '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': 'ev'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'string', 'children': [], 'value': "'negated'"}; {'id': '139', 'type': 'expression_statement', 'children': ['140']}; {'id': '140', 'type': 'assignment', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'neg_evidence'}; {'id': '142', 'type': 'list_comprehension', 'children': ['143', '144', '147']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '144', 'type': 'for_in_clause', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'evidences'}; {'id': '147', 'type': 'if_clause', 'children': ['148']}; {'id': '148', 'type': 'call', 'children': ['149', '154']}; {'id': '149', 'type': 'attribute', 'children': ['150', '153']}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '154', 'type': 'argument_list', 'children': ['155']}; {'id': '155', 'type': 'string', 'children': [], 'value': "'negated'"}; {'id': '156', 'type': 'expression_statement', 'children': ['157']}; {'id': '157', 'type': 'assignment', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'pp'}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': '_score'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'pos_evidence'}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'assignment', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '166', 'type': 'call', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': '_score'}; {'id': '168', 'type': 'argument_list', 'children': ['169']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'neg_evidence'}; {'id': '170', 'type': 'expression_statement', 'children': ['171']}; {'id': '171', 'type': 'assignment', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'score'}; {'id': '173', 'type': 'binary_operator', 'children': ['174', '175'], 'value': '*'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'pp'}; {'id': '175', 'type': '()', 'children': ['176']}; {'id': '176', 'type': 'binary_operator', 'children': ['177', '178'], 'value': '-'}; {'id': '177', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '179', 'type': 'return_statement', 'children': ['180']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'score'}
Return belief score given a list of supporting evidences.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'update_probs'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '20', '78', '82', '153']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '9', 'type': 'float', 'children': [], 'value': '0.05'}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '13', 'type': 'dictionary', 'children': ['14', '17']}; {'id': '14', 'type': 'pair', 'children': ['15', '16']}; {'id': '15', 'type': 'string', 'children': [], 'value': "'syst'"}; {'id': '16', 'type': 'dictionary', 'children': []}; {'id': '17', 'type': 'pair', 'children': ['18', '19']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'rand'"}; {'id': '19', 'type': 'dictionary', 'children': []}; {'id': '20', 'type': 'for_statement', 'children': ['21', '26', '33']}; {'id': '21', 'type': 'pattern_list', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '23', 'type': 'tuple_pattern', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'n'}; {'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': 'prior_counts'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '32', 'type': 'argument_list', 'children': []}; {'id': '33', 'type': 'block', 'children': ['34', '42', '50']}; {'id': '34', 'type': 'if_statement', 'children': ['35', '40']}; {'id': '35', 'type': 'comparison_operator', 'children': ['36', '39'], 'value': '=='}; {'id': '36', 'type': 'binary_operator', 'children': ['37', '38'], 'value': '+'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '39', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '40', 'type': 'block', 'children': ['41']}; {'id': '41', 'type': 'continue_statement', 'children': []}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'assignment', 'children': ['44', '49']}; {'id': '44', 'type': 'subscript', 'children': ['45', '48']}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '47', 'type': 'string', 'children': [], 'value': "'syst'"}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '57', '58']}; {'id': '52', 'type': 'subscript', 'children': ['53', '56']}; {'id': '53', 'type': 'subscript', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '55', 'type': 'string', 'children': [], 'value': "'rand'"}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '57', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '58', 'type': 'binary_operator', 'children': ['59', '77'], 'value': '-'}; {'id': '59', 'type': 'binary_operator', 'children': ['60', '61'], 'value': '-'}; {'id': '60', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '61', 'type': 'call', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '63', 'type': 'argument_list', 'children': ['64']}; {'id': '64', 'type': 'tuple', 'children': ['65', '74']}; {'id': '65', 'type': 'binary_operator', 'children': ['66', '70'], 'value': '/'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '70', 'type': '()', 'children': ['71']}; {'id': '71', 'type': 'binary_operator', 'children': ['72', '73'], 'value': '+'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '74', 'type': 'binary_operator', 'children': ['75', '76'], 'value': '-'}; {'id': '75', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}; {'id': '81', 'type': 'dictionary', 'children': []}; {'id': '82', 'type': 'for_statement', 'children': ['83', '86', '93']}; {'id': '83', 'type': 'pattern_list', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '86', 'type': 'call', 'children': ['87', '92']}; {'id': '87', 'type': 'attribute', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'subtype_counts'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '92', 'type': 'argument_list', 'children': []}; {'id': '93', 'type': 'block', 'children': ['94']}; {'id': '94', 'type': 'for_statement', 'children': ['95', '100', '105']}; {'id': '95', 'type': 'pattern_list', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '97', 'type': 'tuple_pattern', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '100', 'type': 'call', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '104', 'type': 'argument_list', 'children': []}; {'id': '105', 'type': 'block', 'children': ['106', '114', '125']}; {'id': '106', 'type': 'if_statement', 'children': ['107', '112']}; {'id': '107', 'type': 'comparison_operator', 'children': ['108', '111'], 'value': '=='}; {'id': '108', 'type': 'binary_operator', 'children': ['109', '110'], 'value': '+'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '111', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '112', 'type': 'block', 'children': ['113']}; {'id': '113', 'type': 'continue_statement', 'children': []}; {'id': '114', 'type': 'if_statement', 'children': ['115', '118']}; {'id': '115', 'type': 'comparison_operator', 'children': ['116', '117'], 'value': 'not'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}; {'id': '118', 'type': 'block', 'children': ['119']}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '124']}; {'id': '121', 'type': 'subscript', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '124', 'type': 'dictionary', 'children': []}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'assignment', 'children': ['127', '132', '133']}; {'id': '127', 'type': 'subscript', 'children': ['128', '131']}; {'id': '128', 'type': 'subscript', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'source'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'rule'}; {'id': '132', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '133', 'type': 'binary_operator', 'children': ['134', '152'], 'value': '-'}; {'id': '134', 'type': 'binary_operator', 'children': ['135', '136'], 'value': '-'}; {'id': '135', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '136', 'type': 'call', 'children': ['137', '138']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '138', 'type': 'argument_list', 'children': ['139']}; {'id': '139', 'type': 'tuple', 'children': ['140', '149']}; {'id': '140', 'type': 'binary_operator', 'children': ['141', '145'], 'value': '/'}; {'id': '141', 'type': 'call', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '143', 'type': 'argument_list', 'children': ['144']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '145', 'type': '()', 'children': ['146']}; {'id': '146', 'type': 'binary_operator', 'children': ['147', '148'], 'value': '+'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '149', 'type': 'binary_operator', 'children': ['150', '151'], 'value': '-'}; {'id': '150', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'syst_error'}; {'id': '153', 'type': 'expression_statement', 'children': ['154']}; {'id': '154', 'type': 'call', 'children': ['155', '162']}; {'id': '155', 'type': 'attribute', 'children': ['156', '161']}; {'id': '156', 'type': 'call', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'super'}; {'id': '158', 'type': 'argument_list', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'BayesianScorer'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'update_probs'}; {'id': '162', 'type': 'argument_list', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'prior_probs'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'subtype_probs'}
Update the internal probability values given the counts.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_statements'}; {'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': 'reprocess'}; {'id': '7', 'type': 'False', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '219']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '17', '208']}; {'id': '10', 'type': 'boolean_operator', 'children': ['11', '16'], 'value': 'or'}; {'id': '11', 'type': 'comparison_operator', 'children': ['12', '15'], 'value': 'is'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': '_statements'}; {'id': '15', 'type': 'None', 'children': []}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'reprocess'}; {'id': '17', 'type': 'block', 'children': ['18', '33', '167', '199']}; {'id': '18', 'type': 'if_statement', 'children': ['19', '24']}; {'id': '19', 'type': 'comparison_operator', 'children': ['20', '23'], 'value': 'is'}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'block', 'children': ['25', '31']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': '_statements'}; {'id': '30', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '31', 'type': 'return_statement', 'children': ['32']}; {'id': '32', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '33', 'type': 'if_statement', 'children': ['34', '41', '82', '136', '156']}; {'id': '34', 'type': 'comparison_operator', 'children': ['35', '38'], 'value': '=='}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'reader'}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'ReachReader'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '41', 'type': 'block', 'children': ['42']}; {'id': '42', 'type': 'if_statement', 'children': ['43', '50', '71']}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '47'], 'value': '=='}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'formats'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'JSON'}; {'id': '50', 'type': 'block', 'children': ['51', '62']}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'json_str'}; {'id': '54', 'type': 'call', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'dumps'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'assignment', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '65', 'type': 'call', 'children': ['66', '69']}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'reach'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'process_json_str'}; {'id': '69', 'type': 'argument_list', 'children': ['70']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'json_str'}; {'id': '71', 'type': 'else_clause', 'children': ['72']}; {'id': '72', 'type': 'block', 'children': ['73']}; {'id': '73', 'type': 'raise_statement', 'children': ['74']}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'ReadingError'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'binary_operator', 'children': ['78', '79'], 'value': '%'}; {'id': '78', 'type': 'string', 'children': [], 'value': '"Incorrect format for Reach output: %s."'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '82', 'type': 'elif_clause', 'children': ['83', '90']}; {'id': '83', 'type': 'comparison_operator', 'children': ['84', '87'], 'value': '=='}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'reader'}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'SparserReader'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '90', 'type': 'block', 'children': ['91']}; {'id': '91', 'type': 'if_statement', 'children': ['92', '99', '123']}; {'id': '92', 'type': 'comparison_operator', 'children': ['93', '96'], 'value': '=='}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'formats'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'JSON'}; {'id': '99', 'type': 'block', 'children': ['100', '111']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '103', 'type': 'call', 'children': ['104', '107']}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'sparser'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'process_json_dict'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '111', 'type': 'if_statement', 'children': ['112', '115']}; {'id': '112', 'type': 'comparison_operator', 'children': ['113', '114'], 'value': 'is'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '114', 'type': 'None', 'children': []}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'set_statements_pmid'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'None', 'children': []}; {'id': '123', 'type': 'else_clause', 'children': ['124']}; {'id': '124', 'type': 'block', 'children': ['125']}; {'id': '125', 'type': 'raise_statement', 'children': ['126']}; {'id': '126', 'type': 'call', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'ReadingError'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'binary_operator', 'children': ['130', '133'], 'value': '%'}; {'id': '130', 'type': 'concatenated_string', 'children': ['131', '132']}; {'id': '131', 'type': 'string', 'children': [], 'value': '"Sparser should only ever be JSON, not "'}; {'id': '132', 'type': 'string', 'children': [], 'value': '"%s."'}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '136', 'type': 'elif_clause', 'children': ['137', '144']}; {'id': '137', 'type': 'comparison_operator', 'children': ['138', '141'], 'value': '=='}; {'id': '138', 'type': 'attribute', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'reader'}; {'id': '141', 'type': 'attribute', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'TripsReader'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '144', 'type': 'block', 'children': ['145']}; {'id': '145', 'type': 'expression_statement', 'children': ['146']}; {'id': '146', 'type': 'assignment', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '148', 'type': 'call', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'trips'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'process_xml'}; {'id': '152', 'type': 'argument_list', 'children': ['153']}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '156', 'type': 'else_clause', 'children': ['157']}; {'id': '157', 'type': 'block', 'children': ['158']}; {'id': '158', 'type': 'raise_statement', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'ReadingError'}; {'id': '161', 'type': 'argument_list', 'children': ['162']}; {'id': '162', 'type': 'binary_operator', 'children': ['163', '164'], 'value': '%'}; {'id': '163', 'type': 'string', 'children': [], 'value': '"Unknown reader: %s."'}; {'id': '164', 'type': 'attribute', 'children': ['165', '166']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'reader'}; {'id': '167', 'type': 'if_statement', 'children': ['168', '171', '191']}; {'id': '168', 'type': 'comparison_operator', 'children': ['169', '170'], 'value': 'is'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '170', 'type': 'None', 'children': []}; {'id': '171', 'type': 'block', 'children': ['172', '187']}; {'id': '172', 'type': 'expression_statement', 'children': ['173']}; {'id': '173', 'type': 'call', 'children': ['174', '177']}; {'id': '174', 'type': 'attribute', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '177', 'type': 'argument_list', 'children': ['178']}; {'id': '178', 'type': 'binary_operator', 'children': ['179', '180'], 'value': '%'}; {'id': '179', 'type': 'string', 'children': [], 'value': '"Production of statements from %s failed for %s."'}; {'id': '180', 'type': 'tuple', 'children': ['181', '184']}; {'id': '181', 'type': 'attribute', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'reader'}; {'id': '184', 'type': 'attribute', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'content_id'}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'assignment', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '190', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '191', 'type': 'else_clause', 'children': ['192']}; {'id': '192', 'type': 'block', 'children': ['193']}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '196', 'type': 'attribute', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'processor'}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '199', 'type': 'expression_statement', 'children': ['200']}; {'id': '200', 'type': 'assignment', 'children': ['201', '204']}; {'id': '201', 'type': 'attribute', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': '_statements'}; {'id': '204', 'type': 'subscript', 'children': ['205', '206']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '206', 'type': 'slice', 'children': ['207']}; {'id': '207', 'type': 'colon', 'children': []}; {'id': '208', 'type': 'else_clause', 'children': ['209']}; {'id': '209', 'type': 'block', 'children': ['210']}; {'id': '210', 'type': 'expression_statement', 'children': ['211']}; {'id': '211', 'type': 'assignment', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '213', 'type': 'subscript', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': '_statements'}; {'id': '217', 'type': 'slice', 'children': ['218']}; {'id': '218', 'type': 'colon', 'children': []}; {'id': '219', 'type': 'return_statement', 'children': ['220']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'stmts'}
General method to create statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '15']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'read'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9', '12']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'read_list'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '8', 'type': 'False', 'children': []}; {'id': '9', 'type': 'default_parameter', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '11', 'type': 'False', 'children': []}; {'id': '12', 'type': 'default_parameter', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '14', 'type': 'None', 'children': []}; {'id': '15', 'type': 'block', 'children': ['16', '18', '22', '29', '38', '45', '52', '56', '81', '357', '366']}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'string', 'children': [], 'value': '"Perform the actual reading."'}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'assignment', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '21', 'type': 'list', 'children': [], 'value': '[]'}; {'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': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'prep_input'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'read_list'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'file_list'}; {'id': '38', 'type': 'if_statement', 'children': ['39', '42']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '41'], 'value': '=='}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '41', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'return_statement', 'children': ['44']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'string', 'children': [], 'value': '"Beginning to run sparser."'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'output_file_list'}; {'id': '55', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '56', 'type': 'if_statement', 'children': ['57', '58', '75']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '58', 'type': 'block', 'children': ['59', '67']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'assignment', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'log_name'}; {'id': '62', 'type': 'binary_operator', 'children': ['63', '64'], 'value': '%'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'sparser_run_%s.log'"}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': '_time_stamp'}; {'id': '66', 'type': 'argument_list', 'children': []}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'assignment', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '70', 'type': 'call', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '72', 'type': 'argument_list', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'log_name'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'wb'"}; {'id': '75', 'type': 'else_clause', 'children': ['76']}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '80', 'type': 'None', 'children': []}; {'id': '81', 'type': 'try_statement', 'children': ['82', '334']}; {'id': '82', 'type': 'block', 'children': ['83']}; {'id': '83', 'type': 'if_statement', 'children': ['84', '89', '121']}; {'id': '84', 'type': 'comparison_operator', 'children': ['85', '88'], 'value': '=='}; {'id': '85', 'type': 'attribute', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'n_proc'}; {'id': '88', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '89', 'type': 'block', 'children': ['90']}; {'id': '90', 'type': 'for_statement', 'children': ['91', '92', '95']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'fpath'}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'file_list'}; {'id': '95', 'type': 'block', 'children': ['96', '109']}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'assignment', 'children': ['98', '101']}; {'id': '98', 'type': 'pattern_list', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'outpath'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'read_one'}; {'id': '105', 'type': 'argument_list', 'children': ['106', '107', '108']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'fpath'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '109', 'type': 'if_statement', 'children': ['110', '113']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112'], 'value': 'is'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'outpath'}; {'id': '112', 'type': 'None', 'children': []}; {'id': '113', 'type': 'block', 'children': ['114']}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'output_file_list'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'outpath'}; {'id': '121', 'type': 'else_clause', 'children': ['122']}; {'id': '122', 'type': 'block', 'children': ['123', '146', '150', '255']}; {'id': '123', 'type': 'if_statement', 'children': ['124', '127']}; {'id': '124', 'type': 'comparison_operator', 'children': ['125', '126'], 'value': 'is'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '126', 'type': 'None', 'children': []}; {'id': '127', 'type': 'block', 'children': ['128']}; {'id': '128', 'type': 'expression_statement', 'children': ['129']}; {'id': '129', 'type': 'assignment', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '131', 'type': 'call', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'max'}; {'id': '133', 'type': 'argument_list', 'children': ['134', '135']}; {'id': '134', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '135', 'type': 'call', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '137', 'type': 'argument_list', 'children': ['138', '139']}; {'id': '138', 'type': 'integer', 'children': [], 'value': '1000'}; {'id': '139', 'type': 'binary_operator', 'children': ['140', '145'], 'value': '//'}; {'id': '140', 'type': 'binary_operator', 'children': ['141', '142'], 'value': '//'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '142', 'type': 'attribute', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'n_proc'}; {'id': '145', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '149', 'type': 'None', 'children': []}; {'id': '150', 'type': 'try_statement', 'children': ['151', '236']}; {'id': '151', 'type': 'block', 'children': ['152', '161']}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '155', 'type': 'call', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'Pool'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'attribute', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'n_proc'}; {'id': '161', 'type': 'if_statement', 'children': ['162', '165', '207']}; {'id': '162', 'type': 'comparison_operator', 'children': ['163', '164'], 'value': 'is'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '164', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '165', 'type': 'block', 'children': ['166', '195']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '169']}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'batches'}; {'id': '169', 'type': 'list_comprehension', 'children': ['170', '185']}; {'id': '170', 'type': 'subscript', 'children': ['171', '174']}; {'id': '171', 'type': 'attribute', 'children': ['172', '173']}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'file_list'}; {'id': '174', 'type': 'slice', 'children': ['175', '178', '179']}; {'id': '175', 'type': 'binary_operator', 'children': ['176', '177'], 'value': '*'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '178', 'type': 'colon', 'children': []}; {'id': '179', 'type': 'binary_operator', 'children': ['180', '184'], 'value': '*'}; {'id': '180', 'type': '()', 'children': ['181']}; {'id': '181', 'type': 'binary_operator', 'children': ['182', '183'], 'value': '+'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '183', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '185', 'type': 'for_in_clause', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'n'}; {'id': '187', 'type': 'call', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '189', 'type': 'argument_list', 'children': ['190']}; {'id': '190', 'type': 'binary_operator', 'children': ['191', '194'], 'value': '+'}; {'id': '191', 'type': 'binary_operator', 'children': ['192', '193'], 'value': '//'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'L'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'n_per_proc'}; {'id': '194', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '195', 'type': 'expression_statement', 'children': ['196']}; {'id': '196', 'type': 'assignment', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'out_lists_and_buffs'}; {'id': '198', 'type': 'call', 'children': ['199', '202']}; {'id': '199', 'type': 'attribute', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'map'}; {'id': '202', 'type': 'argument_list', 'children': ['203', '206']}; {'id': '203', 'type': 'attribute', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'read_some'}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'batches'}; {'id': '207', 'type': 'else_clause', 'children': ['208']}; {'id': '208', 'type': 'block', 'children': ['209', '223']}; {'id': '209', 'type': 'expression_statement', 'children': ['210']}; {'id': '210', 'type': 'assignment', 'children': ['211', '212']}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'out_files_and_buffs'}; {'id': '212', 'type': 'call', 'children': ['213', '216']}; {'id': '213', 'type': 'attribute', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'map'}; {'id': '216', 'type': 'argument_list', 'children': ['217', '220']}; {'id': '217', 'type': 'attribute', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'read_one'}; {'id': '220', 'type': 'attribute', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'file_list'}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'assignment', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'out_lists_and_buffs'}; {'id': '226', 'type': 'list_comprehension', 'children': ['227', '231']}; {'id': '227', 'type': 'tuple', 'children': ['228', '230']}; {'id': '228', 'type': 'list', 'children': ['229'], 'value': '[out_files]'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'out_files'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'buffs'}; {'id': '231', 'type': 'for_in_clause', 'children': ['232', '235']}; {'id': '232', 'type': 'pattern_list', 'children': ['233', '234']}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'out_files'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'buffs'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'out_files_and_buffs'}; {'id': '236', 'type': 'finally_clause', 'children': ['237']}; {'id': '237', 'type': 'block', 'children': ['238']}; {'id': '238', 'type': 'if_statement', 'children': ['239', '242']}; {'id': '239', 'type': 'comparison_operator', 'children': ['240', '241'], 'value': 'is'}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '241', 'type': 'None', 'children': []}; {'id': '242', 'type': 'block', 'children': ['243', '249']}; {'id': '243', 'type': 'expression_statement', 'children': ['244']}; {'id': '244', 'type': 'call', 'children': ['245', '248']}; {'id': '245', 'type': 'attribute', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'pool'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '248', 'type': 'argument_list', 'children': []}; {'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': 'pool'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '254', 'type': 'argument_list', 'children': []}; {'id': '255', 'type': 'for_statement', 'children': ['256', '261', '265']}; {'id': '256', 'type': 'pattern_list', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '258', 'type': 'tuple_pattern', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'out_list'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'buff'}; {'id': '261', 'type': 'call', 'children': ['262', '263']}; {'id': '262', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '263', 'type': 'argument_list', 'children': ['264']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'out_lists_and_buffs'}; {'id': '265', 'type': 'block', 'children': ['266', '275']}; {'id': '266', 'type': 'if_statement', 'children': ['267', '270']}; {'id': '267', 'type': 'comparison_operator', 'children': ['268', '269'], 'value': 'is'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'out_list'}; {'id': '269', 'type': 'None', 'children': []}; {'id': '270', 'type': 'block', 'children': ['271']}; {'id': '271', 'type': 'expression_statement', 'children': ['272']}; {'id': '272', 'type': 'augmented_assignment', 'children': ['273', '274'], 'value': '+='}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'output_file_list'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'out_list'}; {'id': '275', 'type': 'if_statement', 'children': ['276', '277']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '277', 'type': 'block', 'children': ['278', '292', '328']}; {'id': '278', 'type': 'expression_statement', 'children': ['279']}; {'id': '279', 'type': 'call', 'children': ['280', '283']}; {'id': '280', 'type': 'attribute', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '283', 'type': 'argument_list', 'children': ['284']}; {'id': '284', 'type': 'binary_operator', 'children': ['285', '286'], 'value': '%'}; {'id': '285', 'type': 'string', 'children': [], 'value': "b'Log for producing output %d/%d.\\n'"}; {'id': '286', 'type': 'tuple', 'children': ['287', '288']}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '288', 'type': 'call', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '290', 'type': 'argument_list', 'children': ['291']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'out_lists_and_buffs'}; {'id': '292', 'type': 'if_statement', 'children': ['293', '296', '317']}; {'id': '293', 'type': 'comparison_operator', 'children': ['294', '295'], 'value': 'is'}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'buff'}; {'id': '295', 'type': 'None', 'children': []}; {'id': '296', 'type': 'block', 'children': ['297', '304']}; {'id': '297', 'type': 'expression_statement', 'children': ['298']}; {'id': '298', 'type': 'call', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'buff'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': 'seek'}; {'id': '302', 'type': 'argument_list', 'children': ['303']}; {'id': '303', 'type': 'integer', 'children': [], 'value': '0'}; {'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': 'outbuf'}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '309', 'type': 'argument_list', 'children': ['310']}; {'id': '310', 'type': 'binary_operator', 'children': ['311', '316'], 'value': '+'}; {'id': '311', 'type': 'call', 'children': ['312', '315']}; {'id': '312', 'type': 'attribute', 'children': ['313', '314']}; {'id': '313', 'type': 'identifier', 'children': [], 'value': 'buff'}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'read'}; {'id': '315', 'type': 'argument_list', 'children': []}; {'id': '316', 'type': 'string', 'children': [], 'value': "b'\\n'"}; {'id': '317', 'type': 'else_clause', 'children': ['318']}; {'id': '318', 'type': 'block', 'children': ['319']}; {'id': '319', 'type': 'expression_statement', 'children': ['320']}; {'id': '320', 'type': 'call', 'children': ['321', '324']}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '324', 'type': 'argument_list', 'children': ['325']}; {'id': '325', 'type': 'concatenated_string', 'children': ['326', '327']}; {'id': '326', 'type': 'string', 'children': [], 'value': "b'ERROR: no buffer was None. '"}; {'id': '327', 'type': 'string', 'children': [], 'value': "b'No logs available.\\n'"}; {'id': '328', 'type': 'expression_statement', 'children': ['329']}; {'id': '329', 'type': 'call', 'children': ['330', '333']}; {'id': '330', 'type': 'attribute', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'flush'}; {'id': '333', 'type': 'argument_list', 'children': []}; {'id': '334', 'type': 'finally_clause', 'children': ['335']}; {'id': '335', 'type': 'block', 'children': ['336']}; {'id': '336', 'type': 'if_statement', 'children': ['337', '338']}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'log'}; {'id': '338', 'type': 'block', 'children': ['339', '345']}; {'id': '339', 'type': 'expression_statement', 'children': ['340']}; {'id': '340', 'type': 'call', 'children': ['341', '344']}; {'id': '341', 'type': 'attribute', 'children': ['342', '343']}; {'id': '342', 'type': 'identifier', 'children': [], 'value': 'outbuf'}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '344', 'type': 'argument_list', 'children': []}; {'id': '345', 'type': 'if_statement', 'children': ['346', '347']}; {'id': '346', 'type': 'identifier', 'children': [], 'value': 'verbose'}; {'id': '347', 'type': 'block', 'children': ['348']}; {'id': '348', 'type': 'expression_statement', 'children': ['349']}; {'id': '349', 'type': 'call', 'children': ['350', '353']}; {'id': '350', 'type': 'attribute', 'children': ['351', '352']}; {'id': '351', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '353', 'type': 'argument_list', 'children': ['354']}; {'id': '354', 'type': 'binary_operator', 'children': ['355', '356'], 'value': '%'}; {'id': '355', 'type': 'string', 'children': [], 'value': '"Sparser logs may be found at %s."'}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'log_name'}; {'id': '357', 'type': 'expression_statement', 'children': ['358']}; {'id': '358', 'type': 'assignment', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '360', 'type': 'call', 'children': ['361', '364']}; {'id': '361', 'type': 'attribute', 'children': ['362', '363']}; {'id': '362', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '363', 'type': 'identifier', 'children': [], 'value': 'get_output'}; {'id': '364', 'type': 'argument_list', 'children': ['365']}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'output_file_list'}; {'id': '366', 'type': 'return_statement', 'children': ['367']}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'ret'}
Perform the actual reading.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'set_CCLE_context'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'cell_types'}; {'id': '6', 'type': 'block', 'children': ['7', '13', '26', '39', '49', '95', '279', '286', '296']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'get_gene_names'}; {'id': '12', 'type': 'argument_list', 'children': []}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16', '17']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'exp_values'}; {'id': '16', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'context_client'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'get_protein_expression'}; {'id': '21', 'type': 'argument_list', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': '_gene_names'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'cell_types'}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'assignment', 'children': ['28', '29', '30']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'mut_values'}; {'id': '29', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '30', 'type': 'call', 'children': ['31', '34']}; {'id': '31', 'type': 'attribute', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'context_client'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'get_mutations'}; {'id': '34', 'type': 'argument_list', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': '_gene_names'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'cell_types'}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'muts'}; {'id': '42', 'type': 'dictionary_comprehension', 'children': ['43', '46']}; {'id': '43', 'type': 'pair', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'cell_line'}; {'id': '45', 'type': 'dictionary', 'children': []}; {'id': '46', 'type': 'for_in_clause', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'cell_line'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'cell_types'}; {'id': '49', 'type': 'for_statement', 'children': ['50', '53', '58']}; {'id': '50', 'type': 'pattern_list', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'cell_line'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '53', 'type': 'call', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'mut_values'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '57', 'type': 'argument_list', 'children': []}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'if_statement', 'children': ['60', '63']}; {'id': '60', 'type': 'comparison_operator', 'children': ['61', '62'], 'value': 'is'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '62', 'type': 'None', 'children': []}; {'id': '63', 'type': 'block', 'children': ['64']}; {'id': '64', 'type': 'for_statement', 'children': ['65', '68', '73']}; {'id': '65', 'type': 'pattern_list', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'mutations'}; {'id': '68', 'type': 'call', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '72', 'type': 'argument_list', 'children': []}; {'id': '73', 'type': 'block', 'children': ['74']}; {'id': '74', 'type': 'if_statement', 'children': ['75', '76', '85']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'mutations'}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '84']}; {'id': '79', 'type': 'subscript', 'children': ['80', '83']}; {'id': '80', 'type': 'subscript', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'muts'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'cell_line'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '84', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '85', 'type': 'else_clause', 'children': ['86']}; {'id': '86', 'type': 'block', 'children': ['87']}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '94']}; {'id': '89', 'type': 'subscript', 'children': ['90', '93']}; {'id': '90', 'type': 'subscript', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'muts'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'cell_line'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '94', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '95', 'type': 'function_definition', 'children': ['96', '97', '99']}; {'id': '96', 'type': 'function_name', 'children': [], 'value': 'bin_exp'}; {'id': '97', 'type': 'parameters', 'children': ['98']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'expression_dict'}; {'id': '99', 'type': 'block', 'children': ['100', '104', '108', '138', '142', '177', '194', '277']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'expression_dict'}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'assignment', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'exp_values'}; {'id': '107', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '108', 'type': 'for_statement', 'children': ['109', '110', '111']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '111', 'type': 'block', 'children': ['112']}; {'id': '112', 'type': 'for_statement', 'children': ['113', '114', '117']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '114', 'type': 'subscript', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '117', 'type': 'block', 'children': ['118', '126']}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'assignment', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '121', 'type': 'subscript', 'children': ['122', '125']}; {'id': '122', 'type': 'subscript', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '126', 'type': 'if_statement', 'children': ['127', '130']}; {'id': '127', 'type': 'comparison_operator', 'children': ['128', '129'], 'value': 'is'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '129', 'type': 'None', 'children': []}; {'id': '130', 'type': 'block', 'children': ['131']}; {'id': '131', 'type': 'expression_statement', 'children': ['132']}; {'id': '132', 'type': 'call', 'children': ['133', '136']}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'exp_values'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '138', 'type': 'expression_statement', 'children': ['139']}; {'id': '139', 'type': 'assignment', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'thr_dict'}; {'id': '141', 'type': 'dictionary', 'children': []}; {'id': '142', 'type': 'for_statement', 'children': ['143', '144', '149']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '144', 'type': 'call', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '146', 'type': 'argument_list', 'children': ['147', '148']}; {'id': '147', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '148', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '149', 'type': 'block', 'children': ['150', '171']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'bin_thr'}; {'id': '153', 'type': 'subscript', 'children': ['154', '168']}; {'id': '154', 'type': 'subscript', 'children': ['155', '167']}; {'id': '155', 'type': 'call', 'children': ['156', '159']}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'histogram'}; {'id': '159', 'type': 'argument_list', 'children': ['160', '166']}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'log10'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'exp_values'}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '167', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '168', 'type': 'slice', 'children': ['169', '170']}; {'id': '169', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '170', 'type': 'colon', 'children': []}; {'id': '171', 'type': 'expression_statement', 'children': ['172']}; {'id': '172', 'type': 'assignment', 'children': ['173', '176']}; {'id': '173', 'type': 'subscript', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'thr_dict'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'bin_thr'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '180', 'type': 'dictionary_comprehension', 'children': ['181', '187']}; {'id': '181', 'type': 'pair', 'children': ['182', '183']}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '183', 'type': 'call', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'deepcopy'}; {'id': '185', 'type': 'argument_list', 'children': ['186']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'expression_dict'}; {'id': '187', 'type': 'for_in_clause', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'x'}; {'id': '189', 'type': 'call', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '191', 'type': 'argument_list', 'children': ['192', '193']}; {'id': '192', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '193', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '194', 'type': 'for_statement', 'children': ['195', '196', '197']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '197', 'type': 'block', 'children': ['198']}; {'id': '198', 'type': 'for_statement', 'children': ['199', '200', '203']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '200', 'type': 'subscript', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '203', 'type': 'block', 'children': ['204']}; {'id': '204', 'type': 'for_statement', 'children': ['205', '206', '211']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '206', 'type': 'subscript', 'children': ['207', '210']}; {'id': '207', 'type': 'subscript', 'children': ['208', '209']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '211', 'type': 'block', 'children': ['212']}; {'id': '212', 'type': 'if_statement', 'children': ['213', '222', '233']}; {'id': '213', 'type': 'comparison_operator', 'children': ['214', '221'], 'value': 'is'}; {'id': '214', 'type': 'subscript', 'children': ['215', '220']}; {'id': '215', 'type': 'subscript', 'children': ['216', '219']}; {'id': '216', 'type': 'subscript', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '221', 'type': 'None', 'children': []}; {'id': '222', 'type': 'block', 'children': ['223']}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'assignment', 'children': ['225', '232']}; {'id': '225', 'type': 'subscript', 'children': ['226', '231']}; {'id': '226', 'type': 'subscript', 'children': ['227', '230']}; {'id': '227', 'type': 'subscript', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '233', 'type': 'else_clause', 'children': ['234']}; {'id': '234', 'type': 'block', 'children': ['235', '250']}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '238', 'type': 'call', 'children': ['239', '242']}; {'id': '239', 'type': 'attribute', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'np'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'log10'}; {'id': '242', 'type': 'argument_list', 'children': ['243']}; {'id': '243', 'type': 'subscript', 'children': ['244', '249']}; {'id': '244', 'type': 'subscript', 'children': ['245', '248']}; {'id': '245', 'type': 'subscript', 'children': ['246', '247']}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '250', 'type': 'for_statement', 'children': ['251', '254', '260']}; {'id': '251', 'type': 'pattern_list', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'thr_idx'}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'thr'}; {'id': '254', 'type': 'call', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '256', 'type': 'argument_list', 'children': ['257']}; {'id': '257', 'type': 'subscript', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'thr_dict'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '260', 'type': 'block', 'children': ['261']}; {'id': '261', 'type': 'if_statement', 'children': ['262', '265']}; {'id': '262', 'type': 'comparison_operator', 'children': ['263', '264'], 'value': '<='}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'val'}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'thr'}; {'id': '265', 'type': 'block', 'children': ['266', '276']}; {'id': '266', 'type': 'expression_statement', 'children': ['267']}; {'id': '267', 'type': 'assignment', 'children': ['268', '275']}; {'id': '268', 'type': 'subscript', 'children': ['269', '274']}; {'id': '269', 'type': 'subscript', 'children': ['270', '273']}; {'id': '270', 'type': 'subscript', 'children': ['271', '272']}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'n_bins'}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'line'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'gene'}; {'id': '275', 'type': 'identifier', 'children': [], 'value': 'thr_idx'}; {'id': '276', 'type': 'break_statement', 'children': []}; {'id': '277', 'type': 'return_statement', 'children': ['278']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'binned_dict'}; {'id': '279', 'type': 'expression_statement', 'children': ['280']}; {'id': '280', 'type': 'assignment', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'binned_exp'}; {'id': '282', 'type': 'call', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'bin_exp'}; {'id': '284', 'type': 'argument_list', 'children': ['285']}; {'id': '285', 'type': 'identifier', 'children': [], 'value': 'exp_values'}; {'id': '286', 'type': 'expression_statement', 'children': ['287']}; {'id': '287', 'type': 'assignment', 'children': ['288', '289']}; {'id': '288', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '289', 'type': 'dictionary', 'children': ['290', '293']}; {'id': '290', 'type': 'pair', 'children': ['291', '292']}; {'id': '291', 'type': 'string', 'children': [], 'value': "'bin_expression'"}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'binned_exp'}; {'id': '293', 'type': 'pair', 'children': ['294', '295']}; {'id': '294', 'type': 'string', 'children': [], 'value': "'mutation'"}; {'id': '295', 'type': 'identifier', 'children': [], 'value': 'muts'}; {'id': '296', 'type': 'expression_statement', 'children': ['297']}; {'id': '297', 'type': 'assignment', 'children': ['298', '303']}; {'id': '298', 'type': 'subscript', 'children': ['299', '302']}; {'id': '299', 'type': 'attribute', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '301', 'type': 'identifier', 'children': [], 'value': '_context'}; {'id': '302', 'type': 'string', 'children': [], 'value': "'CCLE'"}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'context'}
Set context of all nodes and node members from CCLE.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_node_key'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'node_dict_item'}; {'id': '6', 'type': 'block', 'children': ['7', '19', '31']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'subscript', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'node_dict_item'}; {'id': '18', 'type': 'string', 'children': [], 'value': "'sources'"}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '22', 'type': 'call', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '24', 'type': 'argument_list', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'subscript', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'node_dict_item'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'targets'"}; {'id': '31', 'type': 'return_statement', 'children': ['32']}; {'id': '32', 'type': 'tuple', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 't'}
Return a tuple of sorted sources and targets given a node dict.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'analyze_db_reading'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'job_prefix'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'reading_queue'}; {'id': '7', 'type': 'string', 'children': [], 'value': "'run_db_reading_queue'"}; {'id': '8', 'type': 'block', 'children': ['9', '17', '21', '25', '29', '66', '80', '98', '108', '118', '239']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'log_strs'}; {'id': '12', 'type': 'call', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'get_logs_from_db_reading'}; {'id': '14', 'type': 'argument_list', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'job_prefix'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'reading_queue'}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'indra_log_strs'}; {'id': '20', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'all_reach_logs'}; {'id': '24', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'log_stats'}; {'id': '28', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '29', 'type': 'for_statement', 'children': ['30', '31', '32']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'log_strs'}; {'id': '32', 'type': 'block', 'children': ['33', '42', '49', '56']}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '38']}; {'id': '35', 'type': 'pattern_list', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'reach_logs'}; {'id': '38', 'type': 'call', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'separate_reach_logs'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'all_reach_logs'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'extend'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'reach_logs'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'indra_log_strs'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'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': 'log_stats'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'id': '62', 'type': 'call', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'get_reading_stats'}; {'id': '64', 'type': 'argument_list', 'children': ['65']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'assignment', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'failed_reach_logs'}; {'id': '69', 'type': 'list_comprehension', 'children': ['70', '71', '76']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'reach_log_str'}; {'id': '71', 'type': 'for_in_clause', 'children': ['72', '75']}; {'id': '72', 'type': 'pattern_list', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'reach_log_str'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'all_reach_logs'}; {'id': '76', 'type': 'if_clause', 'children': ['77']}; {'id': '77', 'type': 'comparison_operator', 'children': ['78', '79'], 'value': '=='}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '79', 'type': 'string', 'children': [], 'value': "'FAILURE'"}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'failed_id_dicts'}; {'id': '83', 'type': 'list_comprehension', 'children': ['84', '90', '93']}; {'id': '84', 'type': 'call', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'analyze_reach_log'}; {'id': '86', 'type': 'argument_list', 'children': ['87']}; {'id': '87', 'type': 'keyword_argument', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'log_str'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'reach_log'}; {'id': '90', 'type': 'for_in_clause', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'reach_log'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'failed_reach_logs'}; {'id': '93', 'type': 'if_clause', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'bool'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'reach_log'}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'assignment', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'tcids_unfinished'}; {'id': '101', 'type': 'set_comprehension', 'children': ['102', '105']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'id_dict'}; {'id': '104', 'type': 'string', 'children': [], 'value': "'not_done'"}; {'id': '105', 'type': 'for_in_clause', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'id_dict'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'failed_id_dicts'}; {'id': '108', 'type': 'expression_statement', 'children': ['109']}; {'id': '109', 'type': 'call', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'binary_operator', 'children': ['113', '114'], 'value': '%'}; {'id': '113', 'type': 'string', 'children': [], 'value': '"Found %d unfinished tcids."'}; {'id': '114', 'type': 'call', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '116', 'type': 'argument_list', 'children': ['117']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'tcids_unfinished'}; {'id': '118', 'type': 'if_statement', 'children': ['119', '120', '233']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'log_stats'}; {'id': '120', 'type': 'block', 'children': ['121', '136']}; {'id': '121', 'type': 'expression_statement', 'children': ['122']}; {'id': '122', 'type': 'assignment', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '124', 'type': 'call', 'children': ['125', '128']}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'fromkeys'}; {'id': '128', 'type': 'argument_list', 'children': ['129']}; {'id': '129', 'type': 'call', 'children': ['130', '135']}; {'id': '130', 'type': 'attribute', 'children': ['131', '134']}; {'id': '131', 'type': 'subscript', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'log_stats'}; {'id': '133', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '135', 'type': 'argument_list', 'children': []}; {'id': '136', 'type': 'for_statement', 'children': ['137', '138', '139']}; {'id': '137', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'log_stats'}; {'id': '139', 'type': 'block', 'children': ['140']}; {'id': '140', 'type': 'for_statement', 'children': ['141', '142', '147']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '142', 'type': 'call', 'children': ['143', '146']}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '146', 'type': 'argument_list', 'children': []}; {'id': '147', 'type': 'block', 'children': ['148']}; {'id': '148', 'type': 'if_statement', 'children': ['149', '156', '208']}; {'id': '149', 'type': 'call', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '151', 'type': 'argument_list', 'children': ['152', '155']}; {'id': '152', 'type': 'subscript', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '156', 'type': 'block', 'children': ['157', '180']}; {'id': '157', 'type': 'if_statement', 'children': ['158', '165']}; {'id': '158', 'type': 'comparison_operator', 'children': ['159', '160'], 'value': 'not'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '164', 'type': 'argument_list', 'children': []}; {'id': '165', 'type': 'block', 'children': ['166']}; {'id': '166', 'type': 'expression_statement', 'children': ['167']}; {'id': '167', 'type': 'assignment', 'children': ['168', '171']}; {'id': '168', 'type': 'subscript', 'children': ['169', '170']}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '171', 'type': 'binary_operator', 'children': ['172', '174'], 'value': '*'}; {'id': '172', 'type': 'list', 'children': ['173'], 'value': '[0]'}; {'id': '173', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '174', 'type': 'call', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '176', 'type': 'argument_list', 'children': ['177']}; {'id': '177', 'type': 'subscript', 'children': ['178', '179']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '180', 'type': 'expression_statement', 'children': ['181']}; {'id': '181', 'type': 'assignment', 'children': ['182', '185']}; {'id': '182', 'type': 'subscript', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '185', 'type': 'list_comprehension', 'children': ['186', '197']}; {'id': '186', 'type': 'binary_operator', 'children': ['187', '192'], 'value': '+'}; {'id': '187', 'type': 'subscript', 'children': ['188', '191']}; {'id': '188', 'type': 'subscript', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '192', 'type': 'subscript', 'children': ['193', '196']}; {'id': '193', 'type': 'subscript', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '197', 'type': 'for_in_clause', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '199', 'type': 'call', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '201', 'type': 'argument_list', 'children': ['202']}; {'id': '202', 'type': 'call', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '204', 'type': 'argument_list', 'children': ['205']}; {'id': '205', 'type': 'subscript', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '208', 'type': 'else_clause', 'children': ['209']}; {'id': '209', 'type': 'block', 'children': ['210', '225']}; {'id': '210', 'type': 'if_statement', 'children': ['211', '218']}; {'id': '211', 'type': 'comparison_operator', 'children': ['212', '213'], 'value': 'not'}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '213', 'type': 'call', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '217', 'type': 'argument_list', 'children': []}; {'id': '218', 'type': 'block', 'children': ['219']}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'assignment', 'children': ['221', '224']}; {'id': '221', 'type': 'subscript', 'children': ['222', '223']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '224', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '225', 'type': 'expression_statement', 'children': ['226']}; {'id': '226', 'type': 'augmented_assignment', 'children': ['227', '230'], 'value': '+='}; {'id': '227', 'type': 'subscript', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '230', 'type': 'subscript', 'children': ['231', '232']}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'log_stat'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '233', 'type': 'else_clause', 'children': ['234']}; {'id': '234', 'type': 'block', 'children': ['235']}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '238', 'type': 'dictionary', 'children': []}; {'id': '239', 'type': 'return_statement', 'children': ['240']}; {'id': '240', 'type': 'expression_list', 'children': ['241', '242', '243']}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'tcids_unfinished'}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'sum_dict'}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'log_stats'}
Run various analysis on a particular reading job.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_create_base_agent'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '6', 'type': 'block', 'children': ['7', '50', '216', '236']}; {'id': '7', 'type': 'try_statement', 'children': ['8', '22']}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '12', 'type': 'subscript', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'agents'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '22', 'type': 'except_clause', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '24', 'type': 'block', 'children': ['25', '37']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'BaseAgent'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '49']}; {'id': '39', 'type': 'subscript', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'agents'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '50', 'type': 'if_statement', 'children': ['51', '56']}; {'id': '51', 'type': 'call', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '53', 'type': 'argument_list', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'Agent'}; {'id': '56', 'type': 'block', 'children': ['57', '96', '109', '170', '191']}; {'id': '57', 'type': 'for_statement', 'children': ['58', '59', '62']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'bc'}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'bound_conditions'}; {'id': '62', 'type': 'block', 'children': ['63', '74', '84']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'bound_base_agent'}; {'id': '66', 'type': 'call', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'get_create_base_agent'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'bc'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'bound_base_agent'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'create_site'}; {'id': '79', 'type': 'argument_list', 'children': ['80']}; {'id': '80', 'type': 'call', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'get_binding_site_name'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'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': 'base_agent'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'create_site'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'call', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'get_binding_site_name'}; {'id': '92', 'type': 'argument_list', 'children': ['93']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'bc'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '96', 'type': 'for_statement', 'children': ['97', '98', '101']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '101', 'type': 'block', 'children': ['102']}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'call', 'children': ['104', '107']}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'create_mod_site'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '109', 'type': 'for_statement', 'children': ['110', '111', '114']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'mutations'}; {'id': '114', 'type': 'block', 'children': ['115', '126', '137', '158']}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '118', 'type': 'conditional_expression', 'children': ['119', '122', '125'], 'value': 'if'}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'residue_from'}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'residue_from'}; {'id': '125', 'type': 'string', 'children': [], 'value': "'mut'"}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'assignment', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'res_to'}; {'id': '129', 'type': 'conditional_expression', 'children': ['130', '133', '136'], 'value': 'if'}; {'id': '130', 'type': 'attribute', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'residue_to'}; {'id': '133', 'type': 'attribute', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'residue_to'}; {'id': '136', 'type': 'string', 'children': [], 'value': "'X'"}; {'id': '137', 'type': 'if_statement', 'children': ['138', '143', '148']}; {'id': '138', 'type': 'comparison_operator', 'children': ['139', '142'], 'value': 'is'}; {'id': '139', 'type': 'attribute', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '142', 'type': 'None', 'children': []}; {'id': '143', 'type': 'block', 'children': ['144']}; {'id': '144', 'type': 'expression_statement', 'children': ['145']}; {'id': '145', 'type': 'assignment', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'mut_site_name'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '148', 'type': 'else_clause', 'children': ['149']}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'mut_site_name'}; {'id': '153', 'type': 'binary_operator', 'children': ['154', '155'], 'value': '+'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '155', 'type': 'attribute', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'mc'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '158', 'type': 'expression_statement', 'children': ['159']}; {'id': '159', 'type': 'call', 'children': ['160', '163']}; {'id': '160', 'type': 'attribute', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'create_site'}; {'id': '163', 'type': 'argument_list', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'mut_site_name'}; {'id': '165', 'type': 'keyword_argument', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'states'}; {'id': '167', 'type': 'list', 'children': ['168', '169'], 'value': "['WT', res_to]"}; {'id': '168', 'type': 'string', 'children': [], 'value': "'WT'"}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'res_to'}; {'id': '170', 'type': 'if_statement', 'children': ['171', '176']}; {'id': '171', 'type': 'comparison_operator', 'children': ['172', '175'], 'value': 'is'}; {'id': '172', 'type': 'attribute', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '175', 'type': 'None', 'children': []}; {'id': '176', 'type': 'block', 'children': ['177']}; {'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': 'base_agent'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'create_site'}; {'id': '182', 'type': 'argument_list', 'children': ['183', '184']}; {'id': '183', 'type': 'string', 'children': [], 'value': "'loc'"}; {'id': '184', 'type': 'list', 'children': ['185'], 'value': '[_n(agent.location)]'}; {'id': '185', 'type': 'call', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '187', 'type': 'argument_list', 'children': ['188']}; {'id': '188', 'type': 'attribute', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'location'}; {'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': 'agent'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '196', 'type': 'None', 'children': []}; {'id': '197', 'type': 'block', 'children': ['198', '206']}; {'id': '198', 'type': 'expression_statement', 'children': ['199']}; {'id': '199', 'type': 'assignment', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'site_name'}; {'id': '201', 'type': 'attribute', 'children': ['202', '205']}; {'id': '202', 'type': 'attribute', 'children': ['203', '204']}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'activity_type'}; {'id': '206', 'type': 'expression_statement', 'children': ['207']}; {'id': '207', 'type': 'call', 'children': ['208', '211']}; {'id': '208', 'type': 'attribute', 'children': ['209', '210']}; {'id': '209', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'create_site'}; {'id': '211', 'type': 'argument_list', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'site_name'}; {'id': '213', 'type': 'list', 'children': ['214', '215'], 'value': "['inactive', 'active']"}; {'id': '214', 'type': 'string', 'children': [], 'value': "'inactive'"}; {'id': '215', 'type': 'string', 'children': [], 'value': "'active'"}; {'id': '216', 'type': 'for_statement', 'children': ['217', '220', '227']}; {'id': '217', 'type': 'pattern_list', 'children': ['218', '219']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'db_name'}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'db_ref'}; {'id': '220', 'type': 'call', 'children': ['221', '226']}; {'id': '221', 'type': 'attribute', 'children': ['222', '225']}; {'id': '222', 'type': 'attribute', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '226', 'type': 'argument_list', 'children': []}; {'id': '227', 'type': 'block', 'children': ['228']}; {'id': '228', 'type': 'expression_statement', 'children': ['229']}; {'id': '229', 'type': 'assignment', 'children': ['230', '235']}; {'id': '230', 'type': 'subscript', 'children': ['231', '234']}; {'id': '231', 'type': 'attribute', 'children': ['232', '233']}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'base_agent'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'db_name'}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'db_ref'}; {'id': '236', 'type': 'return_statement', 'children': ['237']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'base_agent'}
Return base agent with given name, creating it if needed.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'classify_nodes'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'hub'}; {'id': '6', 'type': 'block', 'children': ['7', '18', '140', '144', '227']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'lambda', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '18', 'type': 'for_statement', 'children': ['19', '23', '31']}; {'id': '19', 'type': 'pattern_list', 'children': ['20', '21', '22']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'edges'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'keyword_argument', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '30', 'type': 'True', 'children': []}; {'id': '31', 'type': 'block', 'children': ['32', '124']}; {'id': '32', 'type': 'if_statement', 'children': ['33', '36', '77', '121']}; {'id': '33', 'type': 'comparison_operator', 'children': ['34', '35'], 'value': '=='}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'hub'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '36', 'type': 'block', 'children': ['37', '45']}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '42']}; {'id': '39', 'type': 'pattern_list', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'h'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '42', 'type': 'expression_list', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '45', 'type': 'if_statement', 'children': ['46', '51', '64']}; {'id': '46', 'type': 'comparison_operator', 'children': ['47', '50'], 'value': '!='}; {'id': '47', 'type': 'subscript', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '49', 'type': 'string', 'children': [], 'value': "'i'"}; {'id': '50', 'type': 'string', 'children': [], 'value': "'Complex'"}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '61']}; {'id': '54', 'type': 'attribute', 'children': ['55', '60']}; {'id': '55', 'type': 'subscript', 'children': ['56', '59']}; {'id': '56', 'type': 'subscript', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '59', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '61', 'type': 'argument_list', 'children': ['62']}; {'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', '75']}; {'id': '68', 'type': 'attribute', 'children': ['69', '74']}; {'id': '69', 'type': 'subscript', 'children': ['70', '73']}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '73', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '77', 'type': 'elif_clause', 'children': ['78', '81']}; {'id': '78', 'type': 'comparison_operator', 'children': ['79', '80'], 'value': '=='}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'hub'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '81', 'type': 'block', 'children': ['82', '90']}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'assignment', 'children': ['84', '87']}; {'id': '84', 'type': 'pattern_list', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'h'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '87', 'type': 'expression_list', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '90', 'type': 'if_statement', 'children': ['91', '96', '108']}; {'id': '91', 'type': 'comparison_operator', 'children': ['92', '95'], 'value': '!='}; {'id': '92', 'type': 'subscript', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '94', 'type': 'string', 'children': [], 'value': "'i'"}; {'id': '95', 'type': 'string', 'children': [], 'value': "'Complex'"}; {'id': '96', 'type': 'block', 'children': ['97']}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'call', 'children': ['99', '106']}; {'id': '99', 'type': 'attribute', 'children': ['100', '105']}; {'id': '100', 'type': 'subscript', 'children': ['101', '104']}; {'id': '101', 'type': 'subscript', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '104', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '108', 'type': 'else_clause', 'children': ['109']}; {'id': '109', 'type': 'block', 'children': ['110']}; {'id': '110', 'type': 'expression_statement', 'children': ['111']}; {'id': '111', 'type': 'call', 'children': ['112', '119']}; {'id': '112', 'type': 'attribute', 'children': ['113', '118']}; {'id': '113', 'type': 'subscript', 'children': ['114', '117']}; {'id': '114', 'type': 'subscript', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '117', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '119', 'type': 'argument_list', 'children': ['120']}; {'id': '120', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '121', 'type': 'else_clause', 'children': ['122']}; {'id': '122', 'type': 'block', 'children': ['123']}; {'id': '123', 'type': 'continue_statement', 'children': []}; {'id': '124', 'type': 'expression_statement', 'children': ['125']}; {'id': '125', 'type': 'call', 'children': ['126', '133']}; {'id': '126', 'type': 'attribute', 'children': ['127', '132']}; {'id': '127', 'type': 'subscript', 'children': ['128', '131']}; {'id': '128', 'type': 'subscript', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'o'}; {'id': '131', 'type': 'string', 'children': [], 'value': "'interaction'"}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '133', 'type': 'argument_list', 'children': ['134']}; {'id': '134', 'type': 'call', 'children': ['135', '136']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'edge_type_to_class'}; {'id': '136', 'type': 'argument_list', 'children': ['137']}; {'id': '137', 'type': 'subscript', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '139', 'type': 'string', 'children': [], 'value': "'i'"}; {'id': '140', 'type': 'expression_statement', 'children': ['141']}; {'id': '141', 'type': 'assignment', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'node_classes'}; {'id': '143', 'type': 'dictionary', 'children': []}; {'id': '144', 'type': 'for_statement', 'children': ['145', '148', '153']}; {'id': '145', 'type': 'pattern_list', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'stats'}; {'id': '148', 'type': 'call', 'children': ['149', '152']}; {'id': '149', 'type': 'attribute', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'node_stats'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '152', 'type': 'argument_list', 'children': []}; {'id': '153', 'type': 'block', 'children': ['154', '173', '193', '208', '218']}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'up'}; {'id': '157', 'type': 'call', 'children': ['158', '159']}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'max'}; {'id': '159', 'type': 'argument_list', 'children': ['160', '166']}; {'id': '160', 'type': 'call', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '162', 'type': 'argument_list', 'children': ['163']}; {'id': '163', 'type': 'subscript', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'stats'}; {'id': '165', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '166', 'type': 'keyword_argument', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '168', 'type': 'attribute', 'children': ['169', '172']}; {'id': '169', 'type': 'subscript', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'stats'}; {'id': '171', 'type': 'string', 'children': [], 'value': "'up'"}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '173', 'type': 'expression_statement', 'children': ['174']}; {'id': '174', 'type': 'assignment', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'interactions'}; {'id': '176', 'type': 'list_comprehension', 'children': ['177', '178', '183']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '178', 'type': 'for_in_clause', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '180', 'type': 'subscript', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'stats'}; {'id': '182', 'type': 'string', 'children': [], 'value': "'interaction'"}; {'id': '183', 'type': 'if_clause', 'children': ['184']}; {'id': '184', 'type': 'not_operator', 'children': ['185']}; {'id': '185', 'type': '()', 'children': ['186']}; {'id': '186', 'type': 'boolean_operator', 'children': ['187', '190'], 'value': 'and'}; {'id': '187', 'type': 'comparison_operator', 'children': ['188', '189'], 'value': '!='}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'up'}; {'id': '189', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '190', 'type': 'comparison_operator', 'children': ['191', '192'], 'value': '=='}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '192', 'type': 'string', 'children': [], 'value': "'complex'"}; {'id': '193', 'type': 'expression_statement', 'children': ['194']}; {'id': '194', 'type': 'assignment', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'edge_type'}; {'id': '196', 'type': 'call', 'children': ['197', '198']}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'max'}; {'id': '198', 'type': 'argument_list', 'children': ['199', '203']}; {'id': '199', 'type': 'call', 'children': ['200', '201']}; {'id': '200', 'type': 'identifier', 'children': [], 'value': 'set'}; {'id': '201', 'type': 'argument_list', 'children': ['202']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'interactions'}; {'id': '203', 'type': 'keyword_argument', 'children': ['204', '205']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'interactions'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'count'}; {'id': '208', 'type': 'expression_statement', 'children': ['209']}; {'id': '209', 'type': 'assignment', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'node_type'}; {'id': '211', 'type': 'subscript', 'children': ['212', '217']}; {'id': '212', 'type': 'subscript', 'children': ['213', '216']}; {'id': '213', 'type': 'attribute', 'children': ['214', '215']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'nodes'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '217', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '218', 'type': 'expression_statement', 'children': ['219']}; {'id': '219', 'type': 'assignment', 'children': ['220', '223']}; {'id': '220', 'type': 'subscript', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'node_classes'}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '223', 'type': 'tuple', 'children': ['224', '225', '226']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'up'}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'edge_type'}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'node_type'}; {'id': '227', 'type': 'return_statement', 'children': ['228']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'node_classes'}
Classify each node based on its type and relationship to the hub.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_agent_rule_str'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '5', 'type': 'block', 'children': ['6', '16', '251', '260']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '9', 'type': 'list', 'children': ['10'], 'value': '[_n(agent.name)]'}; {'id': '10', 'type': 'call', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '12', 'type': 'argument_list', 'children': ['13']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '16', 'type': 'if_statement', 'children': ['17', '24']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'ist'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'Agent'}; {'id': '24', 'type': 'block', 'children': ['25', '74', '136', '184', '203']}; {'id': '25', 'type': 'for_statement', 'children': ['26', '27', '30']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '30', 'type': 'block', 'children': ['31', '39', '52', '65']}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'abbrevs'}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'mod_type'}; {'id': '39', 'type': 'if_statement', 'children': ['40', '45']}; {'id': '40', 'type': 'comparison_operator', 'children': ['41', '44'], 'value': 'is'}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '44', 'type': 'None', 'children': []}; {'id': '45', 'type': 'block', 'children': ['46']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'augmented_assignment', 'children': ['48', '49'], 'value': '+='}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '52', 'type': 'if_statement', 'children': ['53', '58']}; {'id': '53', 'type': 'comparison_operator', 'children': ['54', '57'], 'value': 'is'}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '57', 'type': 'None', 'children': []}; {'id': '58', 'type': 'block', 'children': ['59']}; {'id': '59', 'type': 'expression_statement', 'children': ['60']}; {'id': '60', 'type': 'augmented_assignment', 'children': ['61', '62'], 'value': '+='}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'position'}; {'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': 'rule_str_list'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'binary_operator', 'children': ['72', '73'], 'value': '%'}; {'id': '72', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '74', 'type': 'for_statement', 'children': ['75', '76', '79']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'mutations'}; {'id': '79', 'type': 'block', 'children': ['80', '91', '102', '123', '129']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '83', 'type': 'conditional_expression', 'children': ['84', '87', '90'], 'value': 'if'}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'residue_from'}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'residue_from'}; {'id': '90', 'type': 'string', 'children': [], 'value': "'mut'"}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'res_to'}; {'id': '94', 'type': 'conditional_expression', 'children': ['95', '98', '101'], 'value': 'if'}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'residue_to'}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'residue_to'}; {'id': '101', 'type': 'string', 'children': [], 'value': "'X'"}; {'id': '102', 'type': 'if_statement', 'children': ['103', '108', '113']}; {'id': '103', 'type': 'comparison_operator', 'children': ['104', '107'], 'value': 'is'}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '107', 'type': 'None', 'children': []}; {'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': 'mut_site_name'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '113', 'type': 'else_clause', 'children': ['114']}; {'id': '114', 'type': 'block', 'children': ['115']}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'mut_site_name'}; {'id': '118', 'type': 'binary_operator', 'children': ['119', '120'], 'value': '+'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'res_from'}; {'id': '120', 'type': 'attribute', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'mut'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'position'}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '126', 'type': 'binary_operator', 'children': ['127', '128'], 'value': '+'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'mut_site_name'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'res_to'}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'call', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'mstr'}; {'id': '136', 'type': 'if_statement', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'bound_conditions'}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'for_statement', 'children': ['142', '143', '146']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'bound_conditions'}; {'id': '146', 'type': 'block', 'children': ['147']}; {'id': '147', 'type': 'if_statement', 'children': ['148', '151', '166']}; {'id': '148', 'type': 'attribute', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'is_bound'}; {'id': '151', 'type': 'block', 'children': ['152']}; {'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': 'rule_str_list'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '157', 'type': 'argument_list', 'children': ['158']}; {'id': '158', 'type': 'call', 'children': ['159', '160']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '160', 'type': 'argument_list', 'children': ['161']}; {'id': '161', 'type': 'attribute', 'children': ['162', '165']}; {'id': '162', 'type': 'attribute', 'children': ['163', '164']}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '166', 'type': 'else_clause', 'children': ['167']}; {'id': '167', 'type': 'block', 'children': ['168']}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'call', 'children': ['170', '173']}; {'id': '170', 'type': 'attribute', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '172', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '173', 'type': 'argument_list', 'children': ['174']}; {'id': '174', 'type': 'binary_operator', 'children': ['175', '176'], 'value': '+'}; {'id': '175', 'type': 'string', 'children': [], 'value': "'n'"}; {'id': '176', 'type': 'call', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '178', 'type': 'argument_list', 'children': ['179']}; {'id': '179', 'type': 'attribute', 'children': ['180', '183']}; {'id': '180', 'type': 'attribute', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '184', 'type': 'if_statement', 'children': ['185', '190']}; {'id': '185', 'type': 'comparison_operator', 'children': ['186', '189'], 'value': 'is'}; {'id': '186', 'type': 'attribute', 'children': ['187', '188']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '189', 'type': 'None', 'children': []}; {'id': '190', 'type': 'block', 'children': ['191']}; {'id': '191', 'type': 'expression_statement', 'children': ['192']}; {'id': '192', 'type': 'call', 'children': ['193', '196']}; {'id': '193', 'type': 'attribute', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '196', 'type': 'argument_list', 'children': ['197']}; {'id': '197', 'type': 'call', 'children': ['198', '199']}; {'id': '198', 'type': 'identifier', 'children': [], 'value': '_n'}; {'id': '199', 'type': 'argument_list', 'children': ['200']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'location'}; {'id': '203', 'type': 'if_statement', 'children': ['204', '209']}; {'id': '204', 'type': 'comparison_operator', 'children': ['205', '208'], 'value': 'is'}; {'id': '205', 'type': 'attribute', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '208', 'type': 'None', 'children': []}; {'id': '209', 'type': 'block', 'children': ['210']}; {'id': '210', 'type': 'if_statement', 'children': ['211', '216', '232']}; {'id': '211', 'type': 'attribute', 'children': ['212', '215']}; {'id': '212', 'type': 'attribute', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'is_active'}; {'id': '216', 'type': 'block', 'children': ['217']}; {'id': '217', 'type': 'expression_statement', 'children': ['218']}; {'id': '218', 'type': 'call', 'children': ['219', '222']}; {'id': '219', 'type': 'attribute', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '222', 'type': 'argument_list', 'children': ['223']}; {'id': '223', 'type': 'subscript', 'children': ['224', '229']}; {'id': '224', 'type': 'attribute', 'children': ['225', '228']}; {'id': '225', 'type': 'attribute', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'activity_type'}; {'id': '229', 'type': 'slice', 'children': ['230', '231']}; {'id': '230', 'type': 'colon', 'children': []}; {'id': '231', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '232', 'type': 'else_clause', 'children': ['233']}; {'id': '233', 'type': 'block', 'children': ['234']}; {'id': '234', 'type': 'expression_statement', 'children': ['235']}; {'id': '235', 'type': 'call', 'children': ['236', '239']}; {'id': '236', 'type': 'attribute', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '239', 'type': 'argument_list', 'children': ['240']}; {'id': '240', 'type': 'binary_operator', 'children': ['241', '250'], 'value': '+'}; {'id': '241', 'type': 'subscript', 'children': ['242', '247']}; {'id': '242', 'type': 'attribute', 'children': ['243', '246']}; {'id': '243', 'type': 'attribute', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'agent'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'activity'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'activity_type'}; {'id': '247', 'type': 'slice', 'children': ['248', '249']}; {'id': '248', 'type': 'colon', 'children': []}; {'id': '249', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '250', 'type': 'string', 'children': [], 'value': "'_inact'"}; {'id': '251', 'type': 'expression_statement', 'children': ['252']}; {'id': '252', 'type': 'assignment', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'rule_str'}; {'id': '254', 'type': 'call', 'children': ['255', '258']}; {'id': '255', 'type': 'attribute', 'children': ['256', '257']}; {'id': '256', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '258', 'type': 'argument_list', 'children': ['259']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'rule_str_list'}; {'id': '260', 'type': 'return_statement', 'children': ['261']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'rule_str'}
Construct a string from an Agent as part of a PySB rule name.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_modifications'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '21', '27']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '9', 'type': 'string', 'children': [], 'value': '"$.events.frames[(@.type is \'protein-modification\')]"'}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '13', 'type': 'call', 'children': ['14', '19']}; {'id': '14', 'type': 'attribute', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'execute'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '21', 'type': 'if_statement', 'children': ['22', '25']}; {'id': '22', 'type': 'comparison_operator', 'children': ['23', '24'], 'value': 'is'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '24', 'type': 'None', 'children': []}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'return_statement', 'children': []}; {'id': '27', 'type': 'for_statement', 'children': ['28', '29', '30']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '30', 'type': 'block', 'children': ['31', '40', '49', '58', '69', '75', '81', '85', '89', '125', '136', '159']}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'assignment', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '34', 'type': 'call', 'children': ['35', '38']}; {'id': '35', 'type': 'attribute', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'string', 'children': [], 'value': "'subtype'"}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'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': '_get_epistemics'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '49', 'type': 'if_statement', 'children': ['50', '56']}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'string', 'children': [], 'value': "'negated'"}; {'id': '56', 'type': 'block', 'children': ['57']}; {'id': '57', 'type': 'continue_statement', 'children': []}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '63']}; {'id': '60', 'type': 'pattern_list', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '63', 'type': 'call', 'children': ['64', '67']}; {'id': '64', 'type': 'attribute', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': '_get_annot_context'}; {'id': '67', 'type': 'argument_list', 'children': ['68']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'frame_id'}; {'id': '72', 'type': 'subscript', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '74', 'type': 'string', 'children': [], 'value': "'frame_id'"}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'assignment', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '78', 'type': 'subscript', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '80', 'type': 'string', 'children': [], 'value': "'arguments'"}; {'id': '81', 'type': 'expression_statement', 'children': ['82']}; {'id': '82', 'type': 'assignment', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'site'}; {'id': '84', 'type': 'None', 'children': []}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '88', 'type': 'None', 'children': []}; {'id': '89', 'type': 'for_statement', 'children': ['90', '91', '92']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'if_statement', 'children': ['94', '102', '109']}; {'id': '94', 'type': 'comparison_operator', 'children': ['95', '101'], 'value': '=='}; {'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': '_get_arg_type'}; {'id': '99', 'type': 'argument_list', 'children': ['100']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '101', 'type': 'string', 'children': [], 'value': "'theme'"}; {'id': '102', 'type': 'block', 'children': ['103']}; {'id': '103', 'type': 'expression_statement', 'children': ['104']}; {'id': '104', 'type': 'assignment', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '106', 'type': 'subscript', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '108', 'type': 'string', 'children': [], 'value': "'arg'"}; {'id': '109', 'type': 'elif_clause', 'children': ['110', '118']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '117'], 'value': '=='}; {'id': '111', 'type': 'call', 'children': ['112', '115']}; {'id': '112', 'type': 'attribute', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': '_get_arg_type'}; {'id': '115', 'type': 'argument_list', 'children': ['116']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '117', 'type': 'string', 'children': [], 'value': "'site'"}; {'id': '118', 'type': 'block', 'children': ['119']}; {'id': '119', 'type': 'expression_statement', 'children': ['120']}; {'id': '120', 'type': 'assignment', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'site'}; {'id': '122', 'type': 'subscript', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '124', 'type': 'string', 'children': [], 'value': "'text'"}; {'id': '125', 'type': 'expression_statement', 'children': ['126']}; {'id': '126', 'type': 'assignment', 'children': ['127', '130']}; {'id': '127', 'type': 'pattern_list', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'theme_agent'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'theme_coords'}; {'id': '130', 'type': 'call', 'children': ['131', '134']}; {'id': '131', 'type': 'attribute', 'children': ['132', '133']}; {'id': '132', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '133', 'type': 'identifier', 'children': [], 'value': '_get_agent_from_entity'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '136', 'type': 'if_statement', 'children': ['137', '140', '150']}; {'id': '137', 'type': 'comparison_operator', 'children': ['138', '139'], 'value': 'is'}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'site'}; {'id': '139', 'type': 'None', 'children': []}; {'id': '140', 'type': 'block', 'children': ['141']}; {'id': '141', 'type': 'expression_statement', 'children': ['142']}; {'id': '142', 'type': 'assignment', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '144', 'type': 'call', 'children': ['145', '148']}; {'id': '145', 'type': 'attribute', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': '_parse_site_text'}; {'id': '148', 'type': 'argument_list', 'children': ['149']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'site'}; {'id': '150', 'type': 'else_clause', 'children': ['151']}; {'id': '151', 'type': 'block', 'children': ['152']}; {'id': '152', 'type': 'expression_statement', 'children': ['153']}; {'id': '153', 'type': 'assignment', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '155', 'type': 'list', 'children': ['156'], 'value': '[(None, None)]'}; {'id': '156', 'type': 'tuple', 'children': ['157', '158']}; {'id': '157', 'type': 'None', 'children': []}; {'id': '158', 'type': 'None', 'children': []}; {'id': '159', 'type': 'for_statement', 'children': ['160', '161', '162']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'mods'}; {'id': '162', 'type': 'block', 'children': ['163', '169', '177', '188', '195']}; {'id': '163', 'type': 'expression_statement', 'children': ['164']}; {'id': '164', 'type': 'assignment', 'children': ['165', '168']}; {'id': '165', 'type': 'pattern_list', 'children': ['166', '167']}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'pos'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'mod'}; {'id': '169', 'type': 'expression_statement', 'children': ['170']}; {'id': '170', 'type': 'assignment', 'children': ['171', '172']}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '172', 'type': 'binary_operator', 'children': ['173', '174'], 'value': '+'}; {'id': '173', 'type': 'string', 'children': [], 'value': '"$.events.frames[(@.type is \'regulation\') and "'}; {'id': '174', 'type': 'binary_operator', 'children': ['175', '176'], 'value': '%'}; {'id': '175', 'type': 'string', 'children': [], 'value': '"(@.arguments[0].arg is \'%s\')]"'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'frame_id'}; {'id': '177', 'type': 'expression_statement', 'children': ['178']}; {'id': '178', 'type': 'assignment', 'children': ['179', '180']}; {'id': '179', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '180', 'type': 'call', 'children': ['181', '186']}; {'id': '181', 'type': 'attribute', 'children': ['182', '185']}; {'id': '182', 'type': 'attribute', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'execute'}; {'id': '186', 'type': 'argument_list', 'children': ['187']}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '188', 'type': 'expression_statement', 'children': ['189']}; {'id': '189', 'type': 'assignment', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '191', 'type': 'call', 'children': ['192', '193']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '193', 'type': 'argument_list', 'children': ['194']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '195', 'type': 'for_statement', 'children': ['196', '197', '198']}; {'id': '196', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '197', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '198', 'type': 'block', 'children': ['199', '207', '250', '259', '288', '294', '304', '330', '339', '348']}; {'id': '199', 'type': 'expression_statement', 'children': ['200']}; {'id': '200', 'type': 'assignment', 'children': ['201', '204']}; {'id': '201', 'type': 'pattern_list', 'children': ['202', '203']}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '203', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '204', 'type': 'expression_list', 'children': ['205', '206']}; {'id': '205', 'type': 'None', 'children': []}; {'id': '206', 'type': 'None', 'children': []}; {'id': '207', 'type': 'for_statement', 'children': ['208', '209', '212']}; {'id': '208', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '209', 'type': 'subscript', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '211', 'type': 'string', 'children': [], 'value': "'arguments'"}; {'id': '212', 'type': 'block', 'children': ['213']}; {'id': '213', 'type': 'if_statement', 'children': ['214', '222']}; {'id': '214', 'type': 'comparison_operator', 'children': ['215', '221'], 'value': '=='}; {'id': '215', 'type': 'call', 'children': ['216', '219']}; {'id': '216', 'type': 'attribute', 'children': ['217', '218']}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '218', 'type': 'identifier', 'children': [], 'value': '_get_arg_type'}; {'id': '219', 'type': 'argument_list', 'children': ['220']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '221', 'type': 'string', 'children': [], 'value': "'controller'"}; {'id': '222', 'type': 'block', 'children': ['223', '232']}; {'id': '223', 'type': 'expression_statement', 'children': ['224']}; {'id': '224', 'type': 'assignment', 'children': ['225', '226']}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '226', 'type': 'call', 'children': ['227', '230']}; {'id': '227', 'type': 'attribute', 'children': ['228', '229']}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '230', 'type': 'argument_list', 'children': ['231']}; {'id': '231', 'type': 'string', 'children': [], 'value': "'arg'"}; {'id': '232', 'type': 'if_statement', 'children': ['233', '236']}; {'id': '233', 'type': 'comparison_operator', 'children': ['234', '235'], 'value': 'is'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '235', 'type': 'None', 'children': []}; {'id': '236', 'type': 'block', 'children': ['237', '249']}; {'id': '237', 'type': 'expression_statement', 'children': ['238']}; {'id': '238', 'type': 'assignment', 'children': ['239', '242', '243']}; {'id': '239', 'type': 'pattern_list', 'children': ['240', '241']}; {'id': '240', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '241', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '242', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '243', 'type': 'call', 'children': ['244', '247']}; {'id': '244', 'type': 'attribute', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': '_get_agent_from_entity'}; {'id': '247', 'type': 'argument_list', 'children': ['248']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '249', 'type': 'break_statement', 'children': []}; {'id': '250', 'type': 'expression_statement', 'children': ['251']}; {'id': '251', 'type': 'assignment', 'children': ['252', '253']}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'reg_subtype'}; {'id': '253', 'type': 'call', 'children': ['254', '257']}; {'id': '254', 'type': 'attribute', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '257', 'type': 'argument_list', 'children': ['258']}; {'id': '258', 'type': 'string', 'children': [], 'value': "'subtype'"}; {'id': '259', 'type': 'if_statement', 'children': ['260', '263']}; {'id': '260', 'type': 'comparison_operator', 'children': ['261', '262'], 'value': '=='}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'reg_subtype'}; {'id': '262', 'type': 'string', 'children': [], 'value': "'negative-regulation'"}; {'id': '263', 'type': 'block', 'children': ['264', '274']}; {'id': '264', 'type': 'expression_statement', 'children': ['265']}; {'id': '265', 'type': 'assignment', 'children': ['266', '267', '268']}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '267', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '268', 'type': 'call', 'children': ['269', '272']}; {'id': '269', 'type': 'attribute', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'modtype_to_inverse'}; {'id': '271', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '272', 'type': 'argument_list', 'children': ['273']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '274', 'type': 'if_statement', 'children': ['275', '277']}; {'id': '275', 'type': 'not_operator', 'children': ['276']}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '277', 'type': 'block', 'children': ['278', '287']}; {'id': '278', 'type': 'expression_statement', 'children': ['279']}; {'id': '279', 'type': 'call', 'children': ['280', '283']}; {'id': '280', 'type': 'attribute', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '282', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '283', 'type': 'argument_list', 'children': ['284']}; {'id': '284', 'type': 'binary_operator', 'children': ['285', '286'], 'value': '%'}; {'id': '285', 'type': 'string', 'children': [], 'value': "'Unhandled modification type: %s'"}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '287', 'type': 'continue_statement', 'children': []}; {'id': '288', 'type': 'expression_statement', 'children': ['289']}; {'id': '289', 'type': 'assignment', 'children': ['290', '291']}; {'id': '290', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '291', 'type': 'subscript', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '293', 'type': 'string', 'children': [], 'value': "'verbose-text'"}; {'id': '294', 'type': 'expression_statement', 'children': ['295']}; {'id': '295', 'type': 'assignment', 'children': ['296', '301']}; {'id': '296', 'type': 'subscript', 'children': ['297', '300']}; {'id': '297', 'type': 'subscript', 'children': ['298', '299']}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '299', 'type': 'string', 'children': [], 'value': "'agents'"}; {'id': '300', 'type': 'string', 'children': [], 'value': "'coords'"}; {'id': '301', 'type': 'list', 'children': ['302', '303'], 'value': '[controller_coords,\n theme_coords]'}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '303', 'type': 'identifier', 'children': [], 'value': 'theme_coords'}; {'id': '304', 'type': 'expression_statement', 'children': ['305']}; {'id': '305', 'type': 'assignment', 'children': ['306', '307']}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '307', 'type': 'call', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'Evidence'}; {'id': '309', 'type': 'argument_list', 'children': ['310', '313', '316', '319', '324', '327']}; {'id': '310', 'type': 'keyword_argument', 'children': ['311', '312']}; {'id': '311', 'type': 'identifier', 'children': [], 'value': 'source_api'}; {'id': '312', 'type': 'string', 'children': [], 'value': "'reach'"}; {'id': '313', 'type': 'keyword_argument', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '316', 'type': 'keyword_argument', 'children': ['317', '318']}; {'id': '317', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '318', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '319', 'type': 'keyword_argument', 'children': ['320', '321']}; {'id': '320', 'type': 'identifier', 'children': [], 'value': 'pmid'}; {'id': '321', 'type': 'attribute', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'citation'}; {'id': '324', 'type': 'keyword_argument', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '327', 'type': 'keyword_argument', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '330', 'type': 'expression_statement', 'children': ['331']}; {'id': '331', 'type': 'assignment', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '333', 'type': 'list', 'children': ['334', '335', '336', '337', '338'], 'value': '[controller_agent, theme_agent, residue, pos, ev]'}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '335', 'type': 'identifier', 'children': [], 'value': 'theme_agent'}; {'id': '336', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '337', 'type': 'identifier', 'children': [], 'value': 'pos'}; {'id': '338', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '339', 'type': 'expression_statement', 'children': ['340']}; {'id': '340', 'type': 'assignment', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'ModStmt'}; {'id': '342', 'type': 'call', 'children': ['343', '346']}; {'id': '343', 'type': 'attribute', 'children': ['344', '345']}; {'id': '344', 'type': 'identifier', 'children': [], 'value': 'modtype_to_modclass'}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '346', 'type': 'argument_list', 'children': ['347']}; {'id': '347', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '348', 'type': 'if_statement', 'children': ['349', '352', '362']}; {'id': '349', 'type': 'comparison_operator', 'children': ['350', '351'], 'value': 'is'}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'ModStmt'}; {'id': '351', 'type': 'None', 'children': []}; {'id': '352', 'type': 'block', 'children': ['353']}; {'id': '353', 'type': 'expression_statement', 'children': ['354']}; {'id': '354', 'type': 'call', 'children': ['355', '358']}; {'id': '355', 'type': 'attribute', 'children': ['356', '357']}; {'id': '356', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '357', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '358', 'type': 'argument_list', 'children': ['359']}; {'id': '359', 'type': 'binary_operator', 'children': ['360', '361'], 'value': '%'}; {'id': '360', 'type': 'string', 'children': [], 'value': "'Unhandled modification type: %s'"}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '362', 'type': 'else_clause', 'children': ['363']}; {'id': '363', 'type': 'block', 'children': ['364', '377']}; {'id': '364', 'type': 'if_statement', 'children': ['365', '368']}; {'id': '365', 'type': 'comparison_operator', 'children': ['366', '367'], 'value': '=='}; {'id': '366', 'type': 'identifier', 'children': [], 'value': 'modification_type'}; {'id': '367', 'type': 'string', 'children': [], 'value': "'autophosphorylation'"}; {'id': '368', 'type': 'block', 'children': ['369']}; {'id': '369', 'type': 'expression_statement', 'children': ['370']}; {'id': '370', 'type': 'assignment', 'children': ['371', '372']}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '372', 'type': 'list', 'children': ['373', '374', '375', '376'], 'value': '[theme_agent, residue, pos, ev]'}; {'id': '373', 'type': 'identifier', 'children': [], 'value': 'theme_agent'}; {'id': '374', 'type': 'identifier', 'children': [], 'value': 'residue'}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'pos'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '377', 'type': 'expression_statement', 'children': ['378']}; {'id': '378', 'type': 'call', 'children': ['379', '384']}; {'id': '379', 'type': 'attribute', 'children': ['380', '383']}; {'id': '380', 'type': 'attribute', 'children': ['381', '382']}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '382', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '384', 'type': 'argument_list', 'children': ['385']}; {'id': '385', 'type': 'call', 'children': ['386', '387']}; {'id': '386', 'type': 'identifier', 'children': [], 'value': 'ModStmt'}; {'id': '387', 'type': 'argument_list', 'children': ['388']}; {'id': '388', 'type': 'list_splat', 'children': ['389']}; {'id': '389', 'type': 'identifier', 'children': [], 'value': 'args'}
Extract Modification INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_regulate_amounts'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '10', '21', '25', '37', '41', '52', '64']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '9', 'type': 'string', 'children': [], 'value': '"$.events.frames[(@.type is \'transcription\')]"'}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '13', 'type': 'call', 'children': ['14', '19']}; {'id': '14', 'type': 'attribute', 'children': ['15', '18']}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'execute'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'all_res'}; {'id': '24', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '25', 'type': 'if_statement', 'children': ['26', '29']}; {'id': '26', 'type': 'comparison_operator', 'children': ['27', '28'], 'value': 'is'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '28', 'type': 'None', 'children': []}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'augmented_assignment', 'children': ['32', '33'], 'value': '+='}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'all_res'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '40', 'type': 'string', 'children': [], 'value': '"$.events.frames[(@.type is \'amount\')]"'}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '44', 'type': 'call', 'children': ['45', '50']}; {'id': '45', 'type': 'attribute', 'children': ['46', '49']}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'execute'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '52', 'type': 'if_statement', 'children': ['53', '56']}; {'id': '53', 'type': 'comparison_operator', 'children': ['54', '55'], 'value': 'is'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '55', 'type': 'None', 'children': []}; {'id': '56', 'type': 'block', 'children': ['57']}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'augmented_assignment', 'children': ['59', '60'], 'value': '+='}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'all_res'}; {'id': '60', 'type': 'call', 'children': ['61', '62']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '64', 'type': 'for_statement', 'children': ['65', '66', '67']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'all_res'}; {'id': '67', 'type': 'block', 'children': ['68', '77', '86', '95', '106', '112', '118', '122', '143', '149', '160', '168', '179']}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'subtype'}; {'id': '71', 'type': 'call', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'string', 'children': [], 'value': "'subtype'"}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '80', 'type': 'call', 'children': ['81', '84']}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': '_get_epistemics'}; {'id': '84', 'type': 'argument_list', 'children': ['85']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '86', 'type': 'if_statement', 'children': ['87', '93']}; {'id': '87', 'type': 'call', 'children': ['88', '91']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '91', 'type': 'argument_list', 'children': ['92']}; {'id': '92', 'type': 'string', 'children': [], 'value': "'negated'"}; {'id': '93', 'type': 'block', 'children': ['94']}; {'id': '94', 'type': 'continue_statement', 'children': []}; {'id': '95', 'type': 'expression_statement', 'children': ['96']}; {'id': '96', 'type': 'assignment', 'children': ['97', '100']}; {'id': '97', 'type': 'pattern_list', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '100', 'type': 'call', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': '_get_annot_context'}; {'id': '104', 'type': 'argument_list', 'children': ['105']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '106', 'type': 'expression_statement', 'children': ['107']}; {'id': '107', 'type': 'assignment', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'frame_id'}; {'id': '109', 'type': 'subscript', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '111', 'type': 'string', 'children': [], 'value': "'frame_id'"}; {'id': '112', 'type': 'expression_statement', 'children': ['113']}; {'id': '113', 'type': 'assignment', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '115', 'type': 'subscript', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '117', 'type': 'string', 'children': [], 'value': "'arguments'"}; {'id': '118', 'type': 'expression_statement', 'children': ['119']}; {'id': '119', 'type': 'assignment', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '121', 'type': 'None', 'children': []}; {'id': '122', 'type': 'for_statement', 'children': ['123', '124', '125']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '125', 'type': 'block', 'children': ['126']}; {'id': '126', 'type': 'if_statement', 'children': ['127', '135']}; {'id': '127', 'type': 'comparison_operator', 'children': ['128', '134'], 'value': '=='}; {'id': '128', 'type': 'call', 'children': ['129', '132']}; {'id': '129', 'type': 'attribute', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '131', 'type': 'identifier', 'children': [], 'value': '_get_arg_type'}; {'id': '132', 'type': 'argument_list', 'children': ['133']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '134', 'type': 'string', 'children': [], 'value': "'theme'"}; {'id': '135', 'type': 'block', 'children': ['136', '142']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '139', 'type': 'subscript', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '141', 'type': 'string', 'children': [], 'value': "'arg'"}; {'id': '142', 'type': 'break_statement', 'children': []}; {'id': '143', 'type': 'if_statement', 'children': ['144', '147']}; {'id': '144', 'type': 'comparison_operator', 'children': ['145', '146'], 'value': 'is'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '146', 'type': 'None', 'children': []}; {'id': '147', 'type': 'block', 'children': ['148']}; {'id': '148', 'type': 'continue_statement', 'children': []}; {'id': '149', 'type': 'expression_statement', 'children': ['150']}; {'id': '150', 'type': 'assignment', 'children': ['151', '154']}; {'id': '151', 'type': 'pattern_list', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'theme_agent'}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'theme_coords'}; {'id': '154', 'type': 'call', 'children': ['155', '158']}; {'id': '155', 'type': 'attribute', 'children': ['156', '157']}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '157', 'type': 'identifier', 'children': [], 'value': '_get_agent_from_entity'}; {'id': '158', 'type': 'argument_list', 'children': ['159']}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'theme'}; {'id': '160', 'type': 'expression_statement', 'children': ['161']}; {'id': '161', 'type': 'assignment', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '163', 'type': 'binary_operator', 'children': ['164', '165'], 'value': '+'}; {'id': '164', 'type': 'string', 'children': [], 'value': '"$.events.frames[(@.type is \'regulation\') and "'}; {'id': '165', 'type': 'binary_operator', 'children': ['166', '167'], 'value': '%'}; {'id': '166', 'type': 'string', 'children': [], 'value': '"(@.arguments[0].arg is \'%s\')]"'}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'frame_id'}; {'id': '168', 'type': 'expression_statement', 'children': ['169']}; {'id': '169', 'type': 'assignment', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '171', 'type': 'call', 'children': ['172', '177']}; {'id': '172', 'type': 'attribute', 'children': ['173', '176']}; {'id': '173', 'type': 'attribute', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'tree'}; {'id': '176', 'type': 'identifier', 'children': [], 'value': 'execute'}; {'id': '177', 'type': 'argument_list', 'children': ['178']}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'qstr'}; {'id': '179', 'type': 'for_statement', 'children': ['180', '181', '182']}; {'id': '180', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'reg_res'}; {'id': '182', 'type': 'block', 'children': ['183', '191', '219', '225', '235', '261', '268', '277', '300']}; {'id': '183', 'type': 'expression_statement', 'children': ['184']}; {'id': '184', 'type': 'assignment', 'children': ['185', '188']}; {'id': '185', 'type': 'pattern_list', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '187', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '188', 'type': 'expression_list', 'children': ['189', '190']}; {'id': '189', 'type': 'None', 'children': []}; {'id': '190', 'type': 'None', 'children': []}; {'id': '191', 'type': 'for_statement', 'children': ['192', '193', '196']}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '193', 'type': 'subscript', 'children': ['194', '195']}; {'id': '194', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '195', 'type': 'string', 'children': [], 'value': "'arguments'"}; {'id': '196', 'type': 'block', 'children': ['197']}; {'id': '197', 'type': 'if_statement', 'children': ['198', '206']}; {'id': '198', 'type': 'comparison_operator', 'children': ['199', '205'], 'value': '=='}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': '_get_arg_type'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '205', 'type': 'string', 'children': [], 'value': "'controller'"}; {'id': '206', 'type': 'block', 'children': ['207']}; {'id': '207', 'type': 'expression_statement', 'children': ['208']}; {'id': '208', 'type': 'assignment', 'children': ['209', '212', '213']}; {'id': '209', 'type': 'pattern_list', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '212', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '213', 'type': 'call', 'children': ['214', '217']}; {'id': '214', 'type': 'attribute', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '216', 'type': 'identifier', 'children': [], 'value': '_get_controller_agent'}; {'id': '217', 'type': 'argument_list', 'children': ['218']}; {'id': '218', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '219', 'type': 'expression_statement', 'children': ['220']}; {'id': '220', 'type': 'assignment', 'children': ['221', '222']}; {'id': '221', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '222', 'type': 'subscript', 'children': ['223', '224']}; {'id': '223', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '224', 'type': 'string', 'children': [], 'value': "'verbose-text'"}; {'id': '225', 'type': 'expression_statement', 'children': ['226']}; {'id': '226', 'type': 'assignment', 'children': ['227', '232']}; {'id': '227', 'type': 'subscript', 'children': ['228', '231']}; {'id': '228', 'type': 'subscript', 'children': ['229', '230']}; {'id': '229', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '230', 'type': 'string', 'children': [], 'value': "'agents'"}; {'id': '231', 'type': 'string', 'children': [], 'value': "'coords'"}; {'id': '232', 'type': 'list', 'children': ['233', '234'], 'value': '[controller_coords,\n theme_coords]'}; {'id': '233', 'type': 'identifier', 'children': [], 'value': 'controller_coords'}; {'id': '234', 'type': 'identifier', 'children': [], 'value': 'theme_coords'}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '238', 'type': 'call', 'children': ['239', '240']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'Evidence'}; {'id': '240', 'type': 'argument_list', 'children': ['241', '244', '247', '250', '255', '258']}; {'id': '241', 'type': 'keyword_argument', 'children': ['242', '243']}; {'id': '242', 'type': 'identifier', 'children': [], 'value': 'source_api'}; {'id': '243', 'type': 'string', 'children': [], 'value': "'reach'"}; {'id': '244', 'type': 'keyword_argument', 'children': ['245', '246']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '247', 'type': 'keyword_argument', 'children': ['248', '249']}; {'id': '248', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '250', 'type': 'keyword_argument', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'pmid'}; {'id': '252', 'type': 'attribute', 'children': ['253', '254']}; {'id': '253', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'citation'}; {'id': '255', 'type': 'keyword_argument', 'children': ['256', '257']}; {'id': '256', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '258', 'type': 'keyword_argument', 'children': ['259', '260']}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '260', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '261', 'type': 'expression_statement', 'children': ['262']}; {'id': '262', 'type': 'assignment', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '264', 'type': 'list', 'children': ['265', '266', '267'], 'value': '[controller_agent, theme_agent, ev]'}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'controller_agent'}; {'id': '266', 'type': 'identifier', 'children': [], 'value': 'theme_agent'}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '268', 'type': 'expression_statement', 'children': ['269']}; {'id': '269', 'type': 'assignment', 'children': ['270', '271']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'subtype'}; {'id': '271', 'type': 'call', 'children': ['272', '275']}; {'id': '272', 'type': 'attribute', 'children': ['273', '274']}; {'id': '273', 'type': 'identifier', 'children': [], 'value': 'reg'}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '275', 'type': 'argument_list', 'children': ['276']}; {'id': '276', 'type': 'string', 'children': [], 'value': "'subtype'"}; {'id': '277', 'type': 'if_statement', 'children': ['278', '281', '290']}; {'id': '278', 'type': 'comparison_operator', 'children': ['279', '280'], 'value': '=='}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'subtype'}; {'id': '280', 'type': 'string', 'children': [], 'value': "'positive-regulation'"}; {'id': '281', 'type': 'block', 'children': ['282']}; {'id': '282', 'type': 'expression_statement', 'children': ['283']}; {'id': '283', 'type': 'assignment', 'children': ['284', '285']}; {'id': '284', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '285', 'type': 'call', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'IncreaseAmount'}; {'id': '287', 'type': 'argument_list', 'children': ['288']}; {'id': '288', 'type': 'list_splat', 'children': ['289']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '290', 'type': 'else_clause', 'children': ['291']}; {'id': '291', 'type': 'block', 'children': ['292']}; {'id': '292', 'type': 'expression_statement', 'children': ['293']}; {'id': '293', 'type': 'assignment', 'children': ['294', '295']}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'st'}; {'id': '295', 'type': 'call', 'children': ['296', '297']}; {'id': '296', 'type': 'identifier', 'children': [], 'value': 'DecreaseAmount'}; {'id': '297', 'type': 'argument_list', 'children': ['298']}; {'id': '298', 'type': 'list_splat', 'children': ['299']}; {'id': '299', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '300', 'type': 'expression_statement', 'children': ['301']}; {'id': '301', 'type': 'call', 'children': ['302', '307']}; {'id': '302', 'type': 'attribute', 'children': ['303', '306']}; {'id': '303', 'type': 'attribute', 'children': ['304', '305']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '305', 'type': 'identifier', 'children': [], 'value': 'statements'}; {'id': '306', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '307', 'type': 'argument_list', 'children': ['308']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'st'}
Extract RegulateAmount INDRA Statements.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_evidence'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'relation'}; {'id': '6', 'type': 'block', 'children': ['7', '16', '20', '24', '211', '226', '249', '253', '262', '271', '280', '295', '312', '333']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'relation'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '14', 'type': 'argument_list', 'children': ['15']}; {'id': '15', 'type': 'string', 'children': [], 'value': "'provenance'"}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '19', 'type': 'None', 'children': []}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '23', 'type': 'None', 'children': []}; {'id': '24', 'type': 'if_statement', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '26', 'type': 'block', 'children': ['27', '38', '159', '176']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'sentence_tag'}; {'id': '30', 'type': 'call', 'children': ['31', '36']}; {'id': '31', 'type': 'attribute', 'children': ['32', '35']}; {'id': '32', 'type': 'subscript', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '34', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'string', 'children': [], 'value': "'sentence'"}; {'id': '38', 'type': 'if_statement', 'children': ['39', '44']}; {'id': '39', 'type': 'boolean_operator', 'children': ['40', '41'], 'value': 'and'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'sentence_tag'}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': 'in'}; {'id': '42', 'type': 'string', 'children': [], 'value': "'@id'"}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'sentence_tag'}; {'id': '44', 'type': 'block', 'children': ['45', '51', '64', '78', '88', '113', '123']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'sentence_id'}; {'id': '48', 'type': 'subscript', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'sentence_tag'}; {'id': '50', 'type': 'string', 'children': [], 'value': "'@id'"}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '54', 'type': 'call', 'children': ['55', '62']}; {'id': '55', 'type': 'attribute', 'children': ['56', '61']}; {'id': '56', 'type': 'attribute', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'doc'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'sentences'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'sentence_id'}; {'id': '64', 'type': 'if_statement', 'children': ['65', '68']}; {'id': '65', 'type': 'comparison_operator', 'children': ['66', '67'], 'value': 'is'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '67', 'type': 'None', 'children': []}; {'id': '68', 'type': 'block', 'children': ['69']}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': '_sanitize'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'subscript', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '77', 'type': 'string', 'children': [], 'value': "'text'"}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'timexes'}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '85', 'type': 'argument_list', 'children': ['86', '87']}; {'id': '86', 'type': 'string', 'children': [], 'value': "'timexes'"}; {'id': '87', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '88', 'type': 'if_statement', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'timexes'}; {'id': '90', 'type': 'block', 'children': ['91', '97', '104']}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'assignment', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'timex'}; {'id': '94', 'type': 'subscript', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'timexes'}; {'id': '96', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'assignment', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'tc'}; {'id': '100', 'type': 'call', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'time_context_from_timex'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'timex'}; {'id': '104', 'type': 'expression_statement', 'children': ['105']}; {'id': '105', 'type': 'assignment', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '107', 'type': 'call', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'WorldContext'}; {'id': '109', 'type': 'argument_list', 'children': ['110']}; {'id': '110', 'type': 'keyword_argument', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'time'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'tc'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'assignment', 'children': ['115', '116']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'geolocs'}; {'id': '116', 'type': 'call', 'children': ['117', '120']}; {'id': '117', 'type': 'attribute', 'children': ['118', '119']}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'sentence'}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '120', 'type': 'argument_list', 'children': ['121', '122']}; {'id': '121', 'type': 'string', 'children': [], 'value': "'geolocs'"}; {'id': '122', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '123', 'type': 'if_statement', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'geolocs'}; {'id': '125', 'type': 'block', 'children': ['126', '132', '139']}; {'id': '126', 'type': 'expression_statement', 'children': ['127']}; {'id': '127', 'type': 'assignment', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'geoloc'}; {'id': '129', 'type': 'subscript', 'children': ['130', '131']}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'geolocs'}; {'id': '131', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'assignment', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'rc'}; {'id': '135', 'type': 'call', 'children': ['136', '137']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'ref_context_from_geoloc'}; {'id': '137', 'type': 'argument_list', 'children': ['138']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'geoloc'}; {'id': '139', 'type': 'if_statement', 'children': ['140', '141', '148']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '141', 'type': 'block', 'children': ['142']}; {'id': '142', 'type': 'expression_statement', 'children': ['143']}; {'id': '143', 'type': 'assignment', 'children': ['144', '147']}; {'id': '144', 'type': 'attribute', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'geo_location'}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 'rc'}; {'id': '148', 'type': 'else_clause', 'children': ['149']}; {'id': '149', 'type': 'block', 'children': ['150']}; {'id': '150', 'type': 'expression_statement', 'children': ['151']}; {'id': '151', 'type': 'assignment', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '153', 'type': 'call', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'WorldContext'}; {'id': '155', 'type': 'argument_list', 'children': ['156']}; {'id': '156', 'type': 'keyword_argument', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'geo_location'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'rc'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'assignment', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '162', 'type': 'call', 'children': ['163', '174']}; {'id': '163', 'type': 'attribute', 'children': ['164', '173']}; {'id': '164', 'type': 'call', 'children': ['165', '170']}; {'id': '165', 'type': 'attribute', 'children': ['166', '169']}; {'id': '166', 'type': 'subscript', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '168', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '169', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '170', 'type': 'argument_list', 'children': ['171', '172']}; {'id': '171', 'type': 'string', 'children': [], 'value': "'document'"}; {'id': '172', 'type': 'dictionary', 'children': []}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '174', 'type': 'argument_list', 'children': ['175']}; {'id': '175', 'type': 'string', 'children': [], 'value': "'@id'"}; {'id': '176', 'type': 'if_statement', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '178', 'type': 'block', 'children': ['179', '198']}; {'id': '179', 'type': 'expression_statement', 'children': ['180']}; {'id': '180', 'type': 'assignment', 'children': ['181', '182']}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '182', 'type': 'call', 'children': ['183', '196']}; {'id': '183', 'type': 'attribute', 'children': ['184', '195']}; {'id': '184', 'type': 'call', 'children': ['185', '192']}; {'id': '185', 'type': 'attribute', 'children': ['186', '191']}; {'id': '186', 'type': 'attribute', 'children': ['187', '190']}; {'id': '187', 'type': 'attribute', 'children': ['188', '189']}; {'id': '188', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'doc'}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'documents'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '192', 'type': 'argument_list', 'children': ['193', '194']}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'doc_id'}; {'id': '194', 'type': 'dictionary', 'children': []}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '196', 'type': 'argument_list', 'children': ['197']}; {'id': '197', 'type': 'string', 'children': [], 'value': "'title'"}; {'id': '198', 'type': 'if_statement', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '200', 'type': 'block', 'children': ['201']}; {'id': '201', 'type': 'expression_statement', 'children': ['202']}; {'id': '202', 'type': 'assignment', 'children': ['203', '210']}; {'id': '203', 'type': 'subscript', 'children': ['204', '209']}; {'id': '204', 'type': 'subscript', 'children': ['205', '208']}; {'id': '205', 'type': 'subscript', 'children': ['206', '207']}; {'id': '206', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '207', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '208', 'type': 'string', 'children': [], 'value': "'document'"}; {'id': '209', 'type': 'string', 'children': [], 'value': "'title'"}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '211', 'type': 'expression_statement', 'children': ['212']}; {'id': '212', 'type': 'assignment', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '214', 'type': 'dictionary', 'children': ['215', '223']}; {'id': '215', 'type': 'pair', 'children': ['216', '217']}; {'id': '216', 'type': 'string', 'children': [], 'value': "'found_by'"}; {'id': '217', 'type': 'call', 'children': ['218', '221']}; {'id': '218', 'type': 'attribute', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'relation'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '221', 'type': 'argument_list', 'children': ['222']}; {'id': '222', 'type': 'string', 'children': [], 'value': "'rule'"}; {'id': '223', 'type': 'pair', 'children': ['224', '225']}; {'id': '224', 'type': 'string', 'children': [], 'value': "'provenance'"}; {'id': '225', 'type': 'identifier', 'children': [], 'value': 'provenance'}; {'id': '226', 'type': 'if_statement', 'children': ['227', '234']}; {'id': '227', 'type': 'comparison_operator', 'children': ['228', '233'], 'value': 'is'}; {'id': '228', 'type': 'attribute', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'doc'}; {'id': '232', 'type': 'identifier', 'children': [], 'value': 'dct'}; {'id': '233', 'type': 'None', 'children': []}; {'id': '234', 'type': 'block', 'children': ['235']}; {'id': '235', 'type': 'expression_statement', 'children': ['236']}; {'id': '236', 'type': 'assignment', 'children': ['237', '240']}; {'id': '237', 'type': 'subscript', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '239', 'type': 'string', 'children': [], 'value': "'document_creation_time'"}; {'id': '240', 'type': 'call', 'children': ['241', '248']}; {'id': '241', 'type': 'attribute', 'children': ['242', '247']}; {'id': '242', 'type': 'attribute', 'children': ['243', '246']}; {'id': '243', 'type': 'attribute', 'children': ['244', '245']}; {'id': '244', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'doc'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'dct'}; {'id': '247', 'type': 'identifier', 'children': [], 'value': 'to_json'}; {'id': '248', 'type': 'argument_list', 'children': []}; {'id': '249', 'type': 'expression_statement', 'children': ['250']}; {'id': '250', 'type': 'assignment', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '252', 'type': 'dictionary', 'children': []}; {'id': '253', 'type': 'expression_statement', 'children': ['254']}; {'id': '254', 'type': 'assignment', 'children': ['255', '256']}; {'id': '255', 'type': 'identifier', 'children': [], 'value': 'negations'}; {'id': '256', 'type': 'call', 'children': ['257', '260']}; {'id': '257', 'type': 'attribute', 'children': ['258', '259']}; {'id': '258', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '259', 'type': 'identifier', 'children': [], 'value': 'get_negation'}; {'id': '260', 'type': 'argument_list', 'children': ['261']}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'relation'}; {'id': '262', 'type': 'expression_statement', 'children': ['263']}; {'id': '263', 'type': 'assignment', 'children': ['264', '265']}; {'id': '264', 'type': 'identifier', 'children': [], 'value': 'hedgings'}; {'id': '265', 'type': 'call', 'children': ['266', '269']}; {'id': '266', 'type': 'attribute', 'children': ['267', '268']}; {'id': '267', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '268', 'type': 'identifier', 'children': [], 'value': 'get_hedging'}; {'id': '269', 'type': 'argument_list', 'children': ['270']}; {'id': '270', 'type': 'identifier', 'children': [], 'value': 'relation'}; {'id': '271', 'type': 'if_statement', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'hedgings'}; {'id': '273', 'type': 'block', 'children': ['274']}; {'id': '274', 'type': 'expression_statement', 'children': ['275']}; {'id': '275', 'type': 'assignment', 'children': ['276', '279']}; {'id': '276', 'type': 'subscript', 'children': ['277', '278']}; {'id': '277', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '278', 'type': 'string', 'children': [], 'value': "'hedgings'"}; {'id': '279', 'type': 'identifier', 'children': [], 'value': 'hedgings'}; {'id': '280', 'type': 'if_statement', 'children': ['281', '282']}; {'id': '281', 'type': 'identifier', 'children': [], 'value': 'negations'}; {'id': '282', 'type': 'block', 'children': ['283', '289']}; {'id': '283', 'type': 'expression_statement', 'children': ['284']}; {'id': '284', 'type': 'assignment', 'children': ['285', '288']}; {'id': '285', 'type': 'subscript', 'children': ['286', '287']}; {'id': '286', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '287', 'type': 'string', 'children': [], 'value': "'negated'"}; {'id': '288', 'type': 'True', 'children': []}; {'id': '289', 'type': 'expression_statement', 'children': ['290']}; {'id': '290', 'type': 'assignment', 'children': ['291', '294']}; {'id': '291', 'type': 'subscript', 'children': ['292', '293']}; {'id': '292', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '293', 'type': 'string', 'children': [], 'value': "'negated_texts'"}; {'id': '294', 'type': 'identifier', 'children': [], 'value': 'negations'}; {'id': '295', 'type': 'if_statement', 'children': ['296', '299']}; {'id': '296', 'type': 'comparison_operator', 'children': ['297', '298'], 'value': 'is'}; {'id': '297', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '298', 'type': 'None', 'children': []}; {'id': '299', 'type': 'block', 'children': ['300']}; {'id': '300', 'type': 'expression_statement', 'children': ['301']}; {'id': '301', 'type': 'assignment', 'children': ['302', '303']}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '303', 'type': 'call', 'children': ['304', '305']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': '_sanitize'}; {'id': '305', 'type': 'argument_list', 'children': ['306']}; {'id': '306', 'type': 'call', 'children': ['307', '310']}; {'id': '307', 'type': 'attribute', 'children': ['308', '309']}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'event'}; {'id': '309', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '310', 'type': 'argument_list', 'children': ['311']}; {'id': '311', 'type': 'string', 'children': [], 'value': "'text'"}; {'id': '312', 'type': 'expression_statement', 'children': ['313']}; {'id': '313', 'type': 'assignment', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'ev'}; {'id': '315', 'type': 'call', 'children': ['316', '317']}; {'id': '316', 'type': 'identifier', 'children': [], 'value': 'Evidence'}; {'id': '317', 'type': 'argument_list', 'children': ['318', '321', '324', '327', '330']}; {'id': '318', 'type': 'keyword_argument', 'children': ['319', '320']}; {'id': '319', 'type': 'identifier', 'children': [], 'value': 'source_api'}; {'id': '320', 'type': 'string', 'children': [], 'value': "'eidos'"}; {'id': '321', 'type': 'keyword_argument', 'children': ['322', '323']}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '324', 'type': 'keyword_argument', 'children': ['325', '326']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '326', 'type': 'identifier', 'children': [], 'value': 'annotations'}; {'id': '327', 'type': 'keyword_argument', 'children': ['328', '329']}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '329', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '330', 'type': 'keyword_argument', 'children': ['331', '332']}; {'id': '331', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'epistemics'}; {'id': '333', 'type': 'return_statement', 'children': ['334']}; {'id': '334', 'type': 'identifier', 'children': [], 'value': 'ev'}
Return the Evidence object for the INDRA Statment.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_groundings'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'entity'}; {'id': '5', 'type': 'block', 'children': ['6', '77', '86', '95', '101', '160']}; {'id': '6', 'type': 'function_definition', 'children': ['7', '8', '10']}; {'id': '7', 'type': 'function_name', 'children': [], 'value': 'get_grounding_entries'}; {'id': '8', 'type': 'parameters', 'children': ['9']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'grounding'}; {'id': '10', 'type': 'block', 'children': ['11', '17', '21', '31', '75']}; {'id': '11', 'type': 'if_statement', 'children': ['12', '14']}; {'id': '12', 'type': 'not_operator', 'children': ['13']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'grounding'}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'return_statement', 'children': ['16']}; {'id': '16', 'type': 'None', 'children': []}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'assignment', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '20', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'grounding'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '28', 'type': 'argument_list', 'children': ['29', '30']}; {'id': '29', 'type': 'string', 'children': [], 'value': "'values'"}; {'id': '30', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '31', 'type': 'if_statement', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'for_statement', 'children': ['35', '36', '37']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '37', 'type': 'block', 'children': ['38', '47', '56', '66']}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'assignment', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'ont_concept'}; {'id': '41', 'type': 'call', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'string', 'children': [], 'value': "'ontologyConcept'"}; {'id': '47', 'type': 'expression_statement', 'children': ['48']}; {'id': '48', 'type': 'assignment', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'entry'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'string', 'children': [], 'value': "'value'"}; {'id': '56', 'type': 'if_statement', 'children': ['57', '64']}; {'id': '57', 'type': 'boolean_operator', 'children': ['58', '61'], 'value': 'or'}; {'id': '58', 'type': 'comparison_operator', 'children': ['59', '60'], 'value': 'is'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'ont_concept'}; {'id': '60', 'type': 'None', 'children': []}; {'id': '61', 'type': 'comparison_operator', 'children': ['62', '63'], 'value': 'is'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '63', 'type': 'None', 'children': []}; {'id': '64', 'type': 'block', 'children': ['65']}; {'id': '65', 'type': 'continue_statement', 'children': []}; {'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': 'entries'}; {'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': 'ont_concept'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '75', 'type': 'return_statement', 'children': ['76']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '77', 'type': 'expression_statement', 'children': ['78']}; {'id': '78', 'type': 'assignment', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '80', 'type': 'dictionary', 'children': ['81']}; {'id': '81', 'type': 'pair', 'children': ['82', '83']}; {'id': '82', 'type': 'string', 'children': [], 'value': "'TEXT'"}; {'id': '83', 'type': 'subscript', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'entity'}; {'id': '85', 'type': 'string', 'children': [], 'value': "'text'"}; {'id': '86', 'type': 'expression_statement', 'children': ['87']}; {'id': '87', 'type': 'assignment', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'groundings'}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'entity'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'string', 'children': [], 'value': "'groundings'"}; {'id': '95', 'type': 'if_statement', 'children': ['96', '98']}; {'id': '96', 'type': 'not_operator', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'groundings'}; {'id': '98', 'type': 'block', 'children': ['99']}; {'id': '99', 'type': 'return_statement', 'children': ['100']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '101', 'type': 'for_statement', 'children': ['102', '103', '104']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'g'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'groundings'}; {'id': '104', 'type': 'block', 'children': ['105', '112']}; {'id': '105', 'type': 'expression_statement', 'children': ['106']}; {'id': '106', 'type': 'assignment', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '108', 'type': 'call', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'get_grounding_entries'}; {'id': '110', 'type': 'argument_list', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'g'}; {'id': '112', 'type': 'if_statement', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '114', 'type': 'block', 'children': ['115', '125']}; {'id': '115', 'type': 'expression_statement', 'children': ['116']}; {'id': '116', 'type': 'assignment', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '118', 'type': 'call', 'children': ['119', '124']}; {'id': '119', 'type': 'attribute', 'children': ['120', '123']}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'g'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'upper'}; {'id': '124', 'type': 'argument_list', 'children': []}; {'id': '125', 'type': 'if_statement', 'children': ['126', '129', '152']}; {'id': '126', 'type': 'comparison_operator', 'children': ['127', '128'], 'value': '=='}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'UN'"}; {'id': '129', 'type': 'block', 'children': ['130']}; {'id': '130', 'type': 'expression_statement', 'children': ['131']}; {'id': '131', 'type': 'assignment', 'children': ['132', '135']}; {'id': '132', 'type': 'subscript', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '135', 'type': 'list_comprehension', 'children': ['136', '149']}; {'id': '136', 'type': 'tuple', 'children': ['137', '146']}; {'id': '137', 'type': 'call', 'children': ['138', '143']}; {'id': '138', 'type': 'attribute', 'children': ['139', '142']}; {'id': '139', 'type': 'subscript', 'children': ['140', '141']}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '141', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '143', 'type': 'argument_list', 'children': ['144', '145']}; {'id': '144', 'type': 'string', 'children': [], 'value': "' '"}; {'id': '145', 'type': 'string', 'children': [], 'value': "'_'"}; {'id': '146', 'type': 'subscript', 'children': ['147', '148']}; {'id': '147', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '148', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '149', 'type': 'for_in_clause', 'children': ['150', '151']}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '152', 'type': 'else_clause', 'children': ['153']}; {'id': '153', 'type': 'block', 'children': ['154']}; {'id': '154', 'type': 'expression_statement', 'children': ['155']}; {'id': '155', 'type': 'assignment', 'children': ['156', '159']}; {'id': '156', 'type': 'subscript', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'db_refs'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '159', 'type': 'identifier', 'children': [], 'value': 'entries'}; {'id': '160', 'type': 'return_statement', 'children': ['161']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'db_refs'}
Return groundings as db_refs for an entity.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_stmt_by_group'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'stmt_type'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'stmts_this_type'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'eh'}; {'id': '8', 'type': 'block', 'children': ['9', '19', '29', '39', '49', '59', '366', '407', '448']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'stmt_by_first'}; {'id': '12', 'type': 'call', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '16', 'type': 'argument_list', 'children': ['17']}; {'id': '17', 'type': 'lambda', 'children': ['18']}; {'id': '18', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'stmt_by_second'}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'lambda', 'children': ['28']}; {'id': '28', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'none_first'}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'lambda', 'children': ['38']}; {'id': '38', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'none_second'}; {'id': '42', 'type': 'call', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'lambda', 'children': ['48']}; {'id': '48', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '52']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '52', 'type': 'call', 'children': ['53', '56']}; {'id': '53', 'type': 'attribute', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'collections'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'defaultdict'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'lambda', 'children': ['58']}; {'id': '58', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '59', 'type': 'for_statement', 'children': ['60', '61', '62']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'stmts_this_type'}; {'id': '62', 'type': 'block', 'children': ['63', '69', '80']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '68']}; {'id': '65', 'type': 'pattern_list', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '72', 'type': 'call', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': '_get_entities'}; {'id': '76', 'type': 'argument_list', 'children': ['77', '78', '79']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'stmt_type'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'eh'}; {'id': '80', 'type': 'if_statement', 'children': ['81', '84', '125', '196', '231']}; {'id': '81', 'type': 'comparison_operator', 'children': ['82', '83'], 'value': '=='}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'stmt_type'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'Complex'}; {'id': '84', 'type': 'block', 'children': ['85', '89', '96', '102', '109']}; {'id': '85', 'type': 'assert_statement', 'children': ['86']}; {'id': '86', 'type': 'comparison_operator', 'children': ['87', '88'], 'value': 'not'}; {'id': '87', 'type': 'None', 'children': []}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '89', 'type': 'assert_statement', 'children': ['90']}; {'id': '90', 'type': 'comparison_operator', 'children': ['91', '95'], 'value': '>'}; {'id': '91', 'type': 'call', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '95', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'sort'}; {'id': '101', 'type': 'argument_list', 'children': []}; {'id': '102', 'type': 'expression_statement', 'children': ['103']}; {'id': '103', 'type': 'assignment', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '109', 'type': 'if_statement', 'children': ['110', '115']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112'], 'value': 'not'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '112', 'type': 'subscript', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '115', 'type': 'block', 'children': ['116']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '123']}; {'id': '118', 'type': 'attribute', 'children': ['119', '122']}; {'id': '119', 'type': 'subscript', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '123', 'type': 'argument_list', 'children': ['124']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '125', 'type': 'elif_clause', 'children': ['126', '129']}; {'id': '126', 'type': 'comparison_operator', 'children': ['127', '128'], 'value': '=='}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'stmt_type'}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'Conversion'}; {'id': '129', 'type': 'block', 'children': ['130', '137', '180']}; {'id': '130', 'type': 'assert_statement', 'children': ['131']}; {'id': '131', 'type': 'comparison_operator', 'children': ['132', '136'], 'value': '>'}; {'id': '132', 'type': 'call', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '134', 'type': 'argument_list', 'children': ['135']}; {'id': '135', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '136', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '137', 'type': 'expression_statement', 'children': ['138']}; {'id': '138', 'type': 'assignment', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '140', 'type': 'tuple', 'children': ['141', '144', '163']}; {'id': '141', 'type': 'subscript', 'children': ['142', '143']}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '143', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '144', 'type': 'call', 'children': ['145', '146']}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '146', 'type': 'argument_list', 'children': ['147']}; {'id': '147', 'type': 'call', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '149', 'type': 'argument_list', 'children': ['150']}; {'id': '150', 'type': 'subscript', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '152', 'type': 'slice', 'children': ['153', '154', '155']}; {'id': '153', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '154', 'type': 'colon', 'children': []}; {'id': '155', 'type': 'binary_operator', 'children': ['156', '162'], 'value': '+'}; {'id': '156', 'type': 'call', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '158', 'type': 'argument_list', 'children': ['159']}; {'id': '159', 'type': 'attribute', 'children': ['160', '161']}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'obj_from'}; {'id': '162', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '163', 'type': 'call', 'children': ['164', '165']}; {'id': '164', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '165', 'type': 'argument_list', 'children': ['166']}; {'id': '166', 'type': 'call', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'sorted'}; {'id': '168', 'type': 'argument_list', 'children': ['169']}; {'id': '169', 'type': 'subscript', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '171', 'type': 'slice', 'children': ['172', '179']}; {'id': '172', 'type': 'unary_operator', 'children': ['173'], 'value': '-'}; {'id': '173', 'type': 'call', 'children': ['174', '175']}; {'id': '174', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '175', 'type': 'argument_list', 'children': ['176']}; {'id': '176', 'type': 'attribute', 'children': ['177', '178']}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'stmt'}; {'id': '178', 'type': 'identifier', 'children': [], 'value': 'obj_to'}; {'id': '179', 'type': 'colon', 'children': []}; {'id': '180', 'type': 'if_statement', 'children': ['181', '186']}; {'id': '181', 'type': 'comparison_operator', 'children': ['182', '183'], 'value': 'not'}; {'id': '182', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '183', 'type': 'subscript', 'children': ['184', '185']}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '186', 'type': 'block', 'children': ['187']}; {'id': '187', 'type': 'expression_statement', 'children': ['188']}; {'id': '188', 'type': 'call', 'children': ['189', '194']}; {'id': '189', 'type': 'attribute', 'children': ['190', '193']}; {'id': '190', 'type': 'subscript', 'children': ['191', '192']}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '192', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '193', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '194', 'type': 'argument_list', 'children': ['195']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '196', 'type': 'elif_clause', 'children': ['197', '203']}; {'id': '197', 'type': 'comparison_operator', 'children': ['198', '202'], 'value': '=='}; {'id': '198', 'type': 'call', 'children': ['199', '200']}; {'id': '199', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '200', 'type': 'argument_list', 'children': ['201']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '202', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '203', 'type': 'block', 'children': ['204', '208', '215']}; {'id': '204', 'type': 'assert_statement', 'children': ['205']}; {'id': '205', 'type': 'comparison_operator', 'children': ['206', '207'], 'value': 'not'}; {'id': '206', 'type': 'None', 'children': []}; {'id': '207', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '208', 'type': 'expression_statement', 'children': ['209']}; {'id': '209', 'type': 'assignment', 'children': ['210', '211']}; {'id': '210', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '211', 'type': 'call', 'children': ['212', '213']}; {'id': '212', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '213', 'type': 'argument_list', 'children': ['214']}; {'id': '214', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '215', 'type': 'if_statement', 'children': ['216', '221']}; {'id': '216', 'type': 'comparison_operator', 'children': ['217', '218'], 'value': 'not'}; {'id': '217', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '218', 'type': 'subscript', 'children': ['219', '220']}; {'id': '219', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '221', 'type': 'block', 'children': ['222']}; {'id': '222', 'type': 'expression_statement', 'children': ['223']}; {'id': '223', 'type': 'call', 'children': ['224', '229']}; {'id': '224', 'type': 'attribute', 'children': ['225', '228']}; {'id': '225', 'type': 'subscript', 'children': ['226', '227']}; {'id': '226', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '228', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '229', 'type': 'argument_list', 'children': ['230']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '231', 'type': 'else_clause', 'children': ['232']}; {'id': '232', 'type': 'block', 'children': ['233', '240', '247', '253']}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '236', 'type': 'call', 'children': ['237', '238']}; {'id': '237', 'type': 'identifier', 'children': [], 'value': 'tuple'}; {'id': '238', 'type': 'argument_list', 'children': ['239']}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'entities'}; {'id': '240', 'type': 'assert_statement', 'children': ['241']}; {'id': '241', 'type': 'comparison_operator', 'children': ['242', '246'], 'value': '=='}; {'id': '242', 'type': 'call', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '244', 'type': 'argument_list', 'children': ['245']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '246', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '247', 'type': 'assert_statement', 'children': ['248']}; {'id': '248', 'type': 'comparison_operator', 'children': ['249', '250'], 'value': '!='}; {'id': '249', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '250', 'type': 'tuple', 'children': ['251', '252']}; {'id': '251', 'type': 'None', 'children': []}; {'id': '252', 'type': 'None', 'children': []}; {'id': '253', 'type': 'if_statement', 'children': ['254', '267', '279', '305']}; {'id': '254', 'type': 'boolean_operator', 'children': ['255', '260'], 'value': 'and'}; {'id': '255', 'type': 'comparison_operator', 'children': ['256', '259'], 'value': 'is'}; {'id': '256', 'type': 'subscript', 'children': ['257', '258']}; {'id': '257', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '258', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '259', 'type': 'None', 'children': []}; {'id': '260', 'type': 'comparison_operator', 'children': ['261', '262'], 'value': 'not'}; {'id': '261', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '262', 'type': 'subscript', 'children': ['263', '264']}; {'id': '263', 'type': 'identifier', 'children': [], 'value': 'none_first'}; {'id': '264', 'type': 'subscript', 'children': ['265', '266']}; {'id': '265', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '266', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '267', 'type': 'block', 'children': ['268']}; {'id': '268', 'type': 'expression_statement', 'children': ['269']}; {'id': '269', 'type': 'call', 'children': ['270', '277']}; {'id': '270', 'type': 'attribute', 'children': ['271', '276']}; {'id': '271', 'type': 'subscript', 'children': ['272', '273']}; {'id': '272', 'type': 'identifier', 'children': [], 'value': 'none_first'}; {'id': '273', 'type': 'subscript', 'children': ['274', '275']}; {'id': '274', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '275', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '276', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '277', 'type': 'argument_list', 'children': ['278']}; {'id': '278', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '279', 'type': 'elif_clause', 'children': ['280', '293']}; {'id': '280', 'type': 'boolean_operator', 'children': ['281', '286'], 'value': 'and'}; {'id': '281', 'type': 'comparison_operator', 'children': ['282', '285'], 'value': 'is'}; {'id': '282', 'type': 'subscript', 'children': ['283', '284']}; {'id': '283', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '284', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '285', 'type': 'None', 'children': []}; {'id': '286', 'type': 'comparison_operator', 'children': ['287', '288'], 'value': 'not'}; {'id': '287', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '288', 'type': 'subscript', 'children': ['289', '290']}; {'id': '289', 'type': 'identifier', 'children': [], 'value': 'none_second'}; {'id': '290', 'type': 'subscript', 'children': ['291', '292']}; {'id': '291', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '292', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '293', 'type': 'block', 'children': ['294']}; {'id': '294', 'type': 'expression_statement', 'children': ['295']}; {'id': '295', 'type': 'call', 'children': ['296', '303']}; {'id': '296', 'type': 'attribute', 'children': ['297', '302']}; {'id': '297', 'type': 'subscript', 'children': ['298', '299']}; {'id': '298', 'type': 'identifier', 'children': [], 'value': 'none_second'}; {'id': '299', 'type': 'subscript', 'children': ['300', '301']}; {'id': '300', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '301', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '302', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '303', 'type': 'argument_list', 'children': ['304']}; {'id': '304', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '305', 'type': 'elif_clause', 'children': ['306', '309']}; {'id': '306', 'type': 'comparison_operator', 'children': ['307', '308'], 'value': 'not'}; {'id': '307', 'type': 'None', 'children': []}; {'id': '308', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '309', 'type': 'block', 'children': ['310', '326', '346']}; {'id': '310', 'type': 'if_statement', 'children': ['311', '316']}; {'id': '311', 'type': 'comparison_operator', 'children': ['312', '313'], 'value': 'not'}; {'id': '312', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '313', 'type': 'subscript', 'children': ['314', '315']}; {'id': '314', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '315', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '316', 'type': 'block', 'children': ['317']}; {'id': '317', 'type': 'expression_statement', 'children': ['318']}; {'id': '318', 'type': 'call', 'children': ['319', '324']}; {'id': '319', 'type': 'attribute', 'children': ['320', '323']}; {'id': '320', 'type': 'subscript', 'children': ['321', '322']}; {'id': '321', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '322', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '323', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '324', 'type': 'argument_list', 'children': ['325']}; {'id': '325', 'type': 'identifier', 'children': [], 'value': 'stmt_tuple'}; {'id': '326', 'type': 'if_statement', 'children': ['327', '334']}; {'id': '327', 'type': 'comparison_operator', 'children': ['328', '329'], 'value': 'not'}; {'id': '328', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '329', 'type': 'subscript', 'children': ['330', '331']}; {'id': '330', 'type': 'identifier', 'children': [], 'value': 'stmt_by_first'}; {'id': '331', 'type': 'subscript', 'children': ['332', '333']}; {'id': '332', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '333', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '334', 'type': 'block', 'children': ['335']}; {'id': '335', 'type': 'expression_statement', 'children': ['336']}; {'id': '336', 'type': 'call', 'children': ['337', '344']}; {'id': '337', 'type': 'attribute', 'children': ['338', '343']}; {'id': '338', 'type': 'subscript', 'children': ['339', '340']}; {'id': '339', 'type': 'identifier', 'children': [], 'value': 'stmt_by_first'}; {'id': '340', 'type': 'subscript', 'children': ['341', '342']}; {'id': '341', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '342', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '343', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '344', 'type': 'argument_list', 'children': ['345']}; {'id': '345', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '346', 'type': 'if_statement', 'children': ['347', '354']}; {'id': '347', 'type': 'comparison_operator', 'children': ['348', '349'], 'value': 'not'}; {'id': '348', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '349', 'type': 'subscript', 'children': ['350', '351']}; {'id': '350', 'type': 'identifier', 'children': [], 'value': 'stmt_by_second'}; {'id': '351', 'type': 'subscript', 'children': ['352', '353']}; {'id': '352', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '353', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '354', 'type': 'block', 'children': ['355']}; {'id': '355', 'type': 'expression_statement', 'children': ['356']}; {'id': '356', 'type': 'call', 'children': ['357', '364']}; {'id': '357', 'type': 'attribute', 'children': ['358', '363']}; {'id': '358', 'type': 'subscript', 'children': ['359', '360']}; {'id': '359', 'type': 'identifier', 'children': [], 'value': 'stmt_by_second'}; {'id': '360', 'type': 'subscript', 'children': ['361', '362']}; {'id': '361', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '362', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '363', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '364', 'type': 'argument_list', 'children': ['365']}; {'id': '365', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '366', 'type': 'if_statement', 'children': ['367', '368']}; {'id': '367', 'type': 'identifier', 'children': [], 'value': 'none_first'}; {'id': '368', 'type': 'block', 'children': ['369']}; {'id': '369', 'type': 'for_statement', 'children': ['370', '373', '378']}; {'id': '370', 'type': 'pattern_list', 'children': ['371', '372']}; {'id': '371', 'type': 'identifier', 'children': [], 'value': 'second_arg'}; {'id': '372', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '373', 'type': 'call', 'children': ['374', '377']}; {'id': '374', 'type': 'attribute', 'children': ['375', '376']}; {'id': '375', 'type': 'identifier', 'children': [], 'value': 'none_first'}; {'id': '376', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '377', 'type': 'argument_list', 'children': []}; {'id': '378', 'type': 'block', 'children': ['379', '385', '397']}; {'id': '379', 'type': 'expression_statement', 'children': ['380']}; {'id': '380', 'type': 'assignment', 'children': ['381', '382']}; {'id': '381', 'type': 'identifier', 'children': [], 'value': 'second_arg_keys'}; {'id': '382', 'type': 'subscript', 'children': ['383', '384']}; {'id': '383', 'type': 'identifier', 'children': [], 'value': 'stmt_by_second'}; {'id': '384', 'type': 'identifier', 'children': [], 'value': 'second_arg'}; {'id': '385', 'type': 'if_statement', 'children': ['386', '388']}; {'id': '386', 'type': 'not_operator', 'children': ['387']}; {'id': '387', 'type': 'identifier', 'children': [], 'value': 'second_arg_keys'}; {'id': '388', 'type': 'block', 'children': ['389']}; {'id': '389', 'type': 'expression_statement', 'children': ['390']}; {'id': '390', 'type': 'assignment', 'children': ['391', '396']}; {'id': '391', 'type': 'subscript', 'children': ['392', '393']}; {'id': '392', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '393', 'type': 'tuple', 'children': ['394', '395']}; {'id': '394', 'type': 'None', 'children': []}; {'id': '395', 'type': 'identifier', 'children': [], 'value': 'second_arg'}; {'id': '396', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '397', 'type': 'for_statement', 'children': ['398', '399', '400']}; {'id': '398', 'type': 'identifier', 'children': [], 'value': 'second_arg_key'}; {'id': '399', 'type': 'identifier', 'children': [], 'value': 'second_arg_keys'}; {'id': '400', 'type': 'block', 'children': ['401']}; {'id': '401', 'type': 'expression_statement', 'children': ['402']}; {'id': '402', 'type': 'augmented_assignment', 'children': ['403', '406'], 'value': '+='}; {'id': '403', 'type': 'subscript', 'children': ['404', '405']}; {'id': '404', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '405', 'type': 'identifier', 'children': [], 'value': 'second_arg_key'}; {'id': '406', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '407', 'type': 'if_statement', 'children': ['408', '409']}; {'id': '408', 'type': 'identifier', 'children': [], 'value': 'none_second'}; {'id': '409', 'type': 'block', 'children': ['410']}; {'id': '410', 'type': 'for_statement', 'children': ['411', '414', '419']}; {'id': '411', 'type': 'pattern_list', 'children': ['412', '413']}; {'id': '412', 'type': 'identifier', 'children': [], 'value': 'first_arg'}; {'id': '413', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '414', 'type': 'call', 'children': ['415', '418']}; {'id': '415', 'type': 'attribute', 'children': ['416', '417']}; {'id': '416', 'type': 'identifier', 'children': [], 'value': 'none_second'}; {'id': '417', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '418', 'type': 'argument_list', 'children': []}; {'id': '419', 'type': 'block', 'children': ['420', '426', '438']}; {'id': '420', 'type': 'expression_statement', 'children': ['421']}; {'id': '421', 'type': 'assignment', 'children': ['422', '423']}; {'id': '422', 'type': 'identifier', 'children': [], 'value': 'first_arg_keys'}; {'id': '423', 'type': 'subscript', 'children': ['424', '425']}; {'id': '424', 'type': 'identifier', 'children': [], 'value': 'stmt_by_first'}; {'id': '425', 'type': 'identifier', 'children': [], 'value': 'first_arg'}; {'id': '426', 'type': 'if_statement', 'children': ['427', '429']}; {'id': '427', 'type': 'not_operator', 'children': ['428']}; {'id': '428', 'type': 'identifier', 'children': [], 'value': 'first_arg_keys'}; {'id': '429', 'type': 'block', 'children': ['430']}; {'id': '430', 'type': 'expression_statement', 'children': ['431']}; {'id': '431', 'type': 'assignment', 'children': ['432', '437']}; {'id': '432', 'type': 'subscript', 'children': ['433', '434']}; {'id': '433', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '434', 'type': 'tuple', 'children': ['435', '436']}; {'id': '435', 'type': 'identifier', 'children': [], 'value': 'first_arg'}; {'id': '436', 'type': 'None', 'children': []}; {'id': '437', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '438', 'type': 'for_statement', 'children': ['439', '440', '441']}; {'id': '439', 'type': 'identifier', 'children': [], 'value': 'first_arg_key'}; {'id': '440', 'type': 'identifier', 'children': [], 'value': 'first_arg_keys'}; {'id': '441', 'type': 'block', 'children': ['442']}; {'id': '442', 'type': 'expression_statement', 'children': ['443']}; {'id': '443', 'type': 'augmented_assignment', 'children': ['444', '447'], 'value': '+='}; {'id': '444', 'type': 'subscript', 'children': ['445', '446']}; {'id': '445', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}; {'id': '446', 'type': 'identifier', 'children': [], 'value': 'first_arg_key'}; {'id': '447', 'type': 'identifier', 'children': [], 'value': 'stmts'}; {'id': '448', 'type': 'return_statement', 'children': ['449']}; {'id': '449', 'type': 'identifier', 'children': [], 'value': 'stmt_by_group'}
Group Statements of `stmt_type` by their hierarchical relations.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'to_graph'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '225', '233', '241', '253']}; {'id': '6', 'type': 'function_definition', 'children': ['7', '8', '12']}; {'id': '7', 'type': 'function_name', 'children': [], 'value': 'json_node'}; {'id': '8', 'type': 'parameters', 'children': ['9', '10', '11']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '12', 'type': 'block', 'children': ['13', '19', '28', '223']}; {'id': '13', 'type': 'if_statement', 'children': ['14', '16']}; {'id': '14', 'type': 'not_operator', 'children': ['15']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'None', 'children': []}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'string', 'children': [], 'value': "'|'"}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '28', 'type': 'if_statement', 'children': ['29', '34', '82', '178']}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '34', 'type': 'block', 'children': ['35', '45']}; {'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': 'graph'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'add_node'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '42', 'type': 'keyword_argument', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'label'}; {'id': '44', 'type': 'string', 'children': [], 'value': "''"}; {'id': '45', 'type': 'for_statement', 'children': ['46', '49', '53']}; {'id': '46', 'type': 'pattern_list', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'sub_element'}; {'id': '49', 'type': 'call', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'enumerate'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '53', 'type': 'block', 'children': ['54', '68']}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'assignment', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'json_node'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61', '62']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'sub_element'}; {'id': '62', 'type': 'binary_operator', 'children': ['63', '64'], 'value': '+'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '64', 'type': 'list', 'children': ['65'], 'value': "['%s' % i]"}; {'id': '65', 'type': 'binary_operator', 'children': ['66', '67'], 'value': '%'}; {'id': '66', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '68', 'type': 'if_statement', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '70', 'type': 'block', 'children': ['71']}; {'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': 'graph'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'add_edge'}; {'id': '76', 'type': 'argument_list', 'children': ['77', '78', '79']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '79', 'type': 'keyword_argument', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'label'}; {'id': '81', 'type': 'string', 'children': [], 'value': "''"}; {'id': '82', 'type': 'elif_clause', 'children': ['83', '88']}; {'id': '83', 'type': 'call', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '85', 'type': 'argument_list', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '88', 'type': 'block', 'children': ['89', '99']}; {'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': 'graph'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'add_node'}; {'id': '94', 'type': 'argument_list', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '96', 'type': 'keyword_argument', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'label'}; {'id': '98', 'type': 'string', 'children': [], 'value': "''"}; {'id': '99', 'type': 'for_statement', 'children': ['100', '103', '108']}; {'id': '100', 'type': 'pattern_list', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '103', 'type': 'call', 'children': ['104', '107']}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '107', 'type': 'argument_list', 'children': []}; {'id': '108', 'type': 'block', 'children': ['109', '147', '161']}; {'id': '109', 'type': 'if_statement', 'children': ['110', '113', '115', '131']}; {'id': '110', 'type': 'comparison_operator', 'children': ['111', '112'], 'value': '=='}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '112', 'type': 'string', 'children': [], 'value': "'id'"}; {'id': '113', 'type': 'block', 'children': ['114']}; {'id': '114', 'type': 'continue_statement', 'children': []}; {'id': '115', 'type': 'elif_clause', 'children': ['116', '119']}; {'id': '116', 'type': 'comparison_operator', 'children': ['117', '118'], 'value': '=='}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '118', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '119', 'type': 'block', 'children': ['120', '130']}; {'id': '120', 'type': 'expression_statement', 'children': ['121']}; {'id': '121', 'type': 'assignment', 'children': ['122', '129']}; {'id': '122', 'type': 'subscript', 'children': ['123', '128']}; {'id': '123', 'type': 'subscript', 'children': ['124', '127']}; {'id': '124', 'type': 'attribute', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'label'"}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '130', 'type': 'continue_statement', 'children': []}; {'id': '131', 'type': 'elif_clause', 'children': ['132', '135']}; {'id': '132', 'type': 'comparison_operator', 'children': ['133', '134'], 'value': '=='}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '134', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '135', 'type': 'block', 'children': ['136', '146']}; {'id': '136', 'type': 'expression_statement', 'children': ['137']}; {'id': '137', 'type': 'assignment', 'children': ['138', '145']}; {'id': '138', 'type': 'subscript', 'children': ['139', '144']}; {'id': '139', 'type': 'subscript', 'children': ['140', '143']}; {'id': '140', 'type': 'attribute', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'node'}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '144', 'type': 'string', 'children': [], 'value': "'label'"}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '146', 'type': 'continue_statement', 'children': []}; {'id': '147', 'type': 'expression_statement', 'children': ['148']}; {'id': '148', 'type': 'assignment', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '150', 'type': 'call', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'json_node'}; {'id': '152', 'type': 'argument_list', 'children': ['153', '154', '155']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '155', 'type': 'binary_operator', 'children': ['156', '157'], 'value': '+'}; {'id': '156', 'type': 'identifier', 'children': [], 'value': 'prefix'}; {'id': '157', 'type': 'list', 'children': ['158'], 'value': "['%s' % k]"}; {'id': '158', 'type': 'binary_operator', 'children': ['159', '160'], 'value': '%'}; {'id': '159', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '161', 'type': 'if_statement', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '163', 'type': 'block', 'children': ['164']}; {'id': '164', 'type': 'expression_statement', 'children': ['165']}; {'id': '165', 'type': 'call', 'children': ['166', '169']}; {'id': '166', 'type': 'attribute', 'children': ['167', '168']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '168', 'type': 'identifier', 'children': [], 'value': 'add_edge'}; {'id': '169', 'type': 'argument_list', 'children': ['170', '171', '172']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'sub_id'}; {'id': '172', 'type': 'keyword_argument', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'label'}; {'id': '174', 'type': '()', 'children': ['175']}; {'id': '175', 'type': 'binary_operator', 'children': ['176', '177'], 'value': '%'}; {'id': '176', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '177', 'type': 'identifier', 'children': [], 'value': 'k'}; {'id': '178', 'type': 'else_clause', 'children': ['179']}; {'id': '179', 'type': 'block', 'children': ['180', '207']}; {'id': '180', 'type': 'if_statement', 'children': ['181', '194']}; {'id': '181', 'type': 'boolean_operator', 'children': ['182', '187', '188'], 'value': 'and'}; {'id': '182', 'type': 'call', 'children': ['183', '184']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '184', 'type': 'argument_list', 'children': ['185', '186']}; {'id': '185', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'basestring'}; {'id': '187', 'type': 'line_continuation', 'children': [], 'value': '\\'}; {'id': '188', 'type': 'call', 'children': ['189', '192']}; {'id': '189', 'type': 'attribute', 'children': ['190', '191']}; {'id': '190', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '191', 'type': 'identifier', 'children': [], 'value': 'startswith'}; {'id': '192', 'type': 'argument_list', 'children': ['193']}; {'id': '193', 'type': 'string', 'children': [], 'value': "'http'"}; {'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': 'element'}; {'id': '198', 'type': 'subscript', 'children': ['199', '205']}; {'id': '199', 'type': 'call', 'children': ['200', '203']}; {'id': '200', 'type': 'attribute', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '202', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '203', 'type': 'argument_list', 'children': ['204']}; {'id': '204', 'type': 'string', 'children': [], 'value': "'/'"}; {'id': '205', 'type': 'unary_operator', 'children': ['206'], 'value': '-'}; {'id': '206', 'type': 'integer', 'children': [], 'value': '1'}; {'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': 'graph'}; {'id': '211', 'type': 'identifier', 'children': [], 'value': 'add_node'}; {'id': '212', 'type': 'argument_list', 'children': ['213', '214']}; {'id': '213', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '214', 'type': 'keyword_argument', 'children': ['215', '216']}; {'id': '215', 'type': 'identifier', 'children': [], 'value': 'label'}; {'id': '216', 'type': '()', 'children': ['217']}; {'id': '217', 'type': 'binary_operator', 'children': ['218', '219'], 'value': '%'}; {'id': '218', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '219', 'type': 'call', 'children': ['220', '221']}; {'id': '220', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '221', 'type': 'argument_list', 'children': ['222']}; {'id': '222', 'type': 'identifier', 'children': [], 'value': 'element'}; {'id': '223', 'type': 'return_statement', 'children': ['224']}; {'id': '224', 'type': 'identifier', 'children': [], 'value': 'node_id'}; {'id': '225', 'type': 'expression_statement', 'children': ['226']}; {'id': '226', 'type': 'assignment', 'children': ['227', '228']}; {'id': '227', 'type': 'identifier', 'children': [], 'value': 'jd'}; {'id': '228', 'type': 'call', 'children': ['229', '232']}; {'id': '229', 'type': 'attribute', 'children': ['230', '231']}; {'id': '230', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '231', 'type': 'identifier', 'children': [], 'value': 'to_json'}; {'id': '232', 'type': 'argument_list', 'children': []}; {'id': '233', 'type': 'expression_statement', 'children': ['234']}; {'id': '234', 'type': 'assignment', 'children': ['235', '236']}; {'id': '235', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '236', 'type': 'call', 'children': ['237', '240']}; {'id': '237', 'type': 'attribute', 'children': ['238', '239']}; {'id': '238', 'type': 'identifier', 'children': [], 'value': 'networkx'}; {'id': '239', 'type': 'identifier', 'children': [], 'value': 'DiGraph'}; {'id': '240', 'type': 'argument_list', 'children': []}; {'id': '241', 'type': 'expression_statement', 'children': ['242']}; {'id': '242', 'type': 'call', 'children': ['243', '244']}; {'id': '243', 'type': 'identifier', 'children': [], 'value': 'json_node'}; {'id': '244', 'type': 'argument_list', 'children': ['245', '246', '247']}; {'id': '245', 'type': 'identifier', 'children': [], 'value': 'graph'}; {'id': '246', 'type': 'identifier', 'children': [], 'value': 'jd'}; {'id': '247', 'type': 'list', 'children': ['248'], 'value': "['%s' % self.uuid]"}; {'id': '248', 'type': 'binary_operator', 'children': ['249', '250'], 'value': '%'}; {'id': '249', 'type': 'string', 'children': [], 'value': "'%s'"}; {'id': '250', 'type': 'attribute', 'children': ['251', '252']}; {'id': '251', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '252', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '253', 'type': 'return_statement', 'children': ['254']}; {'id': '254', 'type': 'identifier', 'children': [], 'value': 'graph'}
Return Statement as a networkx graph.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_data'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'cols'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'return_statement', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '22']}; {'id': '9', 'type': 'attribute', 'children': ['10', '21']}; {'id': '10', 'type': 'subscript', 'children': ['11', '17']}; {'id': '11', 'type': 'call', 'children': ['12', '15']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'sort_values'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'cols'}; {'id': '17', 'type': 'binary_operator', 'children': ['18', '19'], 'value': '+'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'cols'}; {'id': '19', 'type': 'list', 'children': ['20'], 'value': "['value']"}; {'id': '20', 'type': 'string', 'children': [], 'value': "'value'"}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'reset_index'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'keyword_argument', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'drop'}; {'id': '25', 'type': 'True', 'children': []}
Sort `data` rows and order columns
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'add_identity'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'backend'}; {'id': '8', 'type': 'block', 'children': ['9', '13', '154', '204']}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '12', 'type': 'None', 'children': []}; {'id': '13', 'type': 'try_statement', 'children': ['14', '82', '94', '107', '129']}; {'id': '14', 'type': 'block', 'children': ['15', '34', '51', '72']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'assignment', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'api'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'add_identity'}; {'id': '22', 'type': 'argument_list', 'children': ['23', '24', '25', '28', '31']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'backend'}; {'id': '25', 'type': 'subscript', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '27', 'type': 'string', 'children': [], 'value': "'email'"}; {'id': '28', 'type': 'subscript', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '31', 'type': 'subscript', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '33', 'type': 'string', 'children': [], 'value': "'username'"}; {'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': 'logger'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '39', 'type': 'argument_list', 'children': ['40', '41', '42', '45', '48']}; {'id': '40', 'type': 'string', 'children': [], 'value': '"New sortinghat identity %s %s,%s,%s "'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '44', 'type': 'string', 'children': [], 'value': "'username'"}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '47', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '48', 'type': 'subscript', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '50', 'type': 'string', 'children': [], 'value': "'email'"}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'assignment', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'profile'}; {'id': '54', 'type': 'dictionary', 'children': ['55', '67']}; {'id': '55', 'type': 'pair', 'children': ['56', '57']}; {'id': '56', 'type': 'string', 'children': [], 'value': '"name"'}; {'id': '57', 'type': 'conditional_expression', 'children': ['58', '61', '64'], 'value': 'if'}; {'id': '58', 'type': 'subscript', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '60', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '63', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '64', 'type': 'subscript', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '66', 'type': 'string', 'children': [], 'value': "'username'"}; {'id': '67', 'type': 'pair', 'children': ['68', '69']}; {'id': '68', 'type': 'string', 'children': [], 'value': '"email"'}; {'id': '69', 'type': 'subscript', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '71', 'type': 'string', 'children': [], 'value': "'email'"}; {'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': 'api'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'edit_profile'}; {'id': '77', 'type': 'argument_list', 'children': ['78', '79', '80']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '80', 'type': 'dictionary_splat', 'children': ['81']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'profile'}; {'id': '82', 'type': 'except_clause', 'children': ['83', '87']}; {'id': '83', 'type': 'as_pattern', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'AlreadyExistsError'}; {'id': '85', 'type': 'as_pattern_target', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'ex'}; {'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': 'uuid'}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'ex'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'eid'}; {'id': '94', 'type': 'except_clause', 'children': ['95', '99']}; {'id': '95', 'type': 'as_pattern', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'InvalidValueError'}; {'id': '97', 'type': 'as_pattern_target', 'children': ['98']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'ex'}; {'id': '99', 'type': 'block', 'children': ['100']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'call', 'children': ['102', '105']}; {'id': '102', 'type': 'attribute', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '105', 'type': 'argument_list', 'children': ['106']}; {'id': '106', 'type': 'string', 'children': [], 'value': '"Trying to add a None identity. Ignoring it."'}; {'id': '107', 'type': 'except_clause', 'children': ['108', '112']}; {'id': '108', 'type': 'as_pattern', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'UnicodeEncodeError'}; {'id': '110', 'type': 'as_pattern_target', 'children': ['111']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'ex'}; {'id': '112', 'type': 'block', 'children': ['113']}; {'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': 'logger'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '118', 'type': 'argument_list', 'children': ['119', '120', '123', '126']}; {'id': '119', 'type': 'string', 'children': [], 'value': '"UnicodeEncodeError. Ignoring it. %s %s %s"'}; {'id': '120', 'type': 'subscript', 'children': ['121', '122']}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '122', 'type': 'string', 'children': [], 'value': "'email'"}; {'id': '123', 'type': 'subscript', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '125', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '126', 'type': 'subscript', 'children': ['127', '128']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '128', 'type': 'string', 'children': [], 'value': "'username'"}; {'id': '129', 'type': 'except_clause', 'children': ['130', '134']}; {'id': '130', 'type': 'as_pattern', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '132', 'type': 'as_pattern_target', 'children': ['133']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'ex'}; {'id': '134', 'type': 'block', 'children': ['135']}; {'id': '135', 'type': 'expression_statement', 'children': ['136']}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'warning'}; {'id': '140', 'type': 'argument_list', 'children': ['141', '142', '145', '148', '151']}; {'id': '141', 'type': 'string', 'children': [], 'value': '"Unknown exception adding identity. Ignoring it. %s %s %s"'}; {'id': '142', 'type': 'subscript', 'children': ['143', '144']}; {'id': '143', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '144', 'type': 'string', 'children': [], 'value': "'email'"}; {'id': '145', 'type': 'subscript', 'children': ['146', '147']}; {'id': '146', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '147', 'type': 'string', 'children': [], 'value': "'name'"}; {'id': '148', 'type': 'subscript', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '150', 'type': 'string', 'children': [], 'value': "'username'"}; {'id': '151', 'type': 'keyword_argument', 'children': ['152', '153']}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'exc_info'}; {'id': '153', 'type': 'True', 'children': []}; {'id': '154', 'type': 'if_statement', 'children': ['155', '164']}; {'id': '155', 'type': 'boolean_operator', 'children': ['156', '159'], 'value': 'and'}; {'id': '156', 'type': 'comparison_operator', 'children': ['157', '158'], 'value': 'in'}; {'id': '157', 'type': 'string', 'children': [], 'value': "'company'"}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '159', 'type': 'comparison_operator', 'children': ['160', '163'], 'value': 'is'}; {'id': '160', 'type': 'subscript', 'children': ['161', '162']}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '162', 'type': 'string', 'children': [], 'value': "'company'"}; {'id': '163', 'type': 'None', 'children': []}; {'id': '164', 'type': 'block', 'children': ['165']}; {'id': '165', 'type': 'try_statement', 'children': ['166', '200']}; {'id': '166', 'type': 'block', 'children': ['167', '177']}; {'id': '167', 'type': 'expression_statement', 'children': ['168']}; {'id': '168', 'type': 'call', 'children': ['169', '172']}; {'id': '169', 'type': 'attribute', 'children': ['170', '171']}; {'id': '170', 'type': 'identifier', 'children': [], 'value': 'api'}; {'id': '171', 'type': 'identifier', 'children': [], 'value': 'add_organization'}; {'id': '172', 'type': 'argument_list', 'children': ['173', '174']}; {'id': '173', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '174', 'type': 'subscript', 'children': ['175', '176']}; {'id': '175', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '176', 'type': 'string', 'children': [], 'value': "'company'"}; {'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': 'api'}; {'id': '181', 'type': 'identifier', 'children': [], 'value': 'add_enrollment'}; {'id': '182', 'type': 'argument_list', 'children': ['183', '184', '185', '188', '194']}; {'id': '183', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '184', 'type': 'identifier', 'children': [], 'value': 'uuid'}; {'id': '185', 'type': 'subscript', 'children': ['186', '187']}; {'id': '186', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '187', 'type': 'string', 'children': [], 'value': "'company'"}; {'id': '188', 'type': 'call', 'children': ['189', '190']}; {'id': '189', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '190', 'type': 'argument_list', 'children': ['191', '192', '193']}; {'id': '191', 'type': 'integer', 'children': [], 'value': '1900'}; {'id': '192', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '193', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '194', 'type': 'call', 'children': ['195', '196']}; {'id': '195', 'type': 'identifier', 'children': [], 'value': 'datetime'}; {'id': '196', 'type': 'argument_list', 'children': ['197', '198', '199']}; {'id': '197', 'type': 'integer', 'children': [], 'value': '2100'}; {'id': '198', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '199', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '200', 'type': 'except_clause', 'children': ['201', '202']}; {'id': '201', 'type': 'identifier', 'children': [], 'value': 'AlreadyExistsError'}; {'id': '202', 'type': 'block', 'children': ['203']}; {'id': '203', 'type': 'pass_statement', 'children': []}; {'id': '204', 'type': 'return_statement', 'children': ['205']}; {'id': '205', 'type': 'identifier', 'children': [], 'value': 'uuid'}
Load and identity list from backend in Sorting Hat
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'add_identities'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'identities'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'backend'}; {'id': '8', 'type': 'block', 'children': ['9', '16', '20', '55']}; {'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': 'logger'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '14', 'type': 'argument_list', 'children': ['15']}; {'id': '15', 'type': 'string', 'children': [], 'value': '"Adding the identities to SortingHat"'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'total'}; {'id': '19', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '20', 'type': 'for_statement', 'children': ['21', '22', '23']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'identities'}; {'id': '23', 'type': 'block', 'children': ['24']}; {'id': '24', 'type': 'try_statement', 'children': ['25', '39']}; {'id': '25', 'type': 'block', 'children': ['26', '35']}; {'id': '26', 'type': 'expression_statement', 'children': ['27']}; {'id': '27', 'type': 'call', 'children': ['28', '31']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'add_identity'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '33', '34']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'db'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'identity'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'backend'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'augmented_assignment', 'children': ['37', '38'], 'value': '+='}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'total'}; {'id': '38', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '39', 'type': 'except_clause', 'children': ['40', '44']}; {'id': '40', 'type': 'as_pattern', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '42', 'type': 'as_pattern_target', 'children': ['43']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '44', 'type': 'block', 'children': ['45', '54']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '50', 'type': 'argument_list', 'children': ['51']}; {'id': '51', 'type': 'binary_operator', 'children': ['52', '53'], 'value': '%'}; {'id': '52', 'type': 'string', 'children': [], 'value': '"Unexcepted error when adding identities: %s"'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'e'}; {'id': '54', 'type': 'continue_statement', 'children': []}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'call', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'logger'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '60', 'type': 'argument_list', 'children': ['61', '62']}; {'id': '61', 'type': 'string', 'children': [], 'value': '"Total identities added to SH: %i"'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'total'}
Load identities list from backend in Sorting Hat