nodes: 0, module; 1, function_definition; 2, function_name:remove_hash_prefix_indices; 3, parameters; 4, block; 5, identifier:self; 6, identifier:threat_list; 7, identifier:indices; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, with_statement; 13, comment:"""Remove records matching idices from a lexicographically-sorted local threat list."""; 14, assignment; 15, assignment; 16, assignment; 17, with_clause; 18, block; 19, identifier:batch_size; 20, integer:40; 21, identifier:q; 22, string; 23, identifier:prefixes_to_remove; 24, call; 25, with_item; 26, for_statement; 27, string_content:DELETE FROM hash_prefix
                  WHERE threat_type=? AND platform_type=? AND threat_entry_type=? AND value IN ({}); 28, attribute; 29, argument_list; 30, as_pattern; 31, identifier:i; 32, call; 33, block; 34, identifier:self; 35, identifier:get_hash_prefix_values_to_remove; 36, identifier:threat_list; 37, identifier:indices; 38, call; 39, as_pattern_target; 40, identifier:range; 41, argument_list; 42, expression_statement; 43, expression_statement; 44, expression_statement; 45, attribute; 46, argument_list; 47, identifier:dbc; 48, integer:0; 49, call; 50, identifier:batch_size; 51, assignment; 52, assignment; 53, call; 54, identifier:self; 55, identifier:get_cursor; 56, identifier:len; 57, argument_list; 58, identifier:remove_batch; 59, subscript; 60, identifier:params; 61, binary_operator:[
                      threat_list.threat_type,
                      threat_list.platform_type,
                      threat_list.threat_entry_type
                  ] + [sqlite3.Binary(b) for b in remove_batch]; 62, attribute; 63, argument_list; 64, identifier:prefixes_to_remove; 65, identifier:prefixes_to_remove; 66, slice; 67, list; 68, list_comprehension; 69, identifier:dbc; 70, identifier:execute; 71, call; 72, identifier:params; 73, identifier:i; 74, parenthesized_expression; 75, attribute; 76, attribute; 77, attribute; 78, call; 79, for_in_clause; 80, attribute; 81, argument_list; 82, binary_operator:i + batch_size; 83, identifier:threat_list; 84, identifier:threat_type; 85, identifier:threat_list; 86, identifier:platform_type; 87, identifier:threat_list; 88, identifier:threat_entry_type; 89, attribute; 90, argument_list; 91, identifier:b; 92, identifier:remove_batch; 93, identifier:q; 94, identifier:format; 95, call; 96, identifier:i; 97, identifier:batch_size; 98, identifier:sqlite3; 99, identifier:Binary; 100, identifier:b; 101, attribute; 102, argument_list; 103, string; 104, identifier:join; 105, binary_operator:['?'] * len(remove_batch); 106, string_content:,; 107, list; 108, call; 109, string; 110, identifier:len; 111, argument_list; 112, string_content:?; 113, identifier:remove_batch
code: def remove_hash_prefix_indices(self, threat_list, indices):
          """Remove records matching idices from a lexicographically-sorted local threat list."""
          batch_size = 40
          q = '''DELETE FROM hash_prefix
                  WHERE threat_type=? AND platform_type=? AND threat_entry_type=? AND value IN ({})
          '''
          prefixes_to_remove = self.get_hash_prefix_values_to_remove(threat_list, indices)
          with self.get_cursor() as dbc:
              for i in range(0, len(prefixes_to_remove), batch_size):
                  remove_batch = prefixes_to_remove[i:(i + batch_size)]
                  params = [
                      threat_list.threat_type,
                      threat_list.platform_type,
                      threat_list.threat_entry_type
                  ] + [sqlite3.Binary(b) for b in remove_batch]
                  dbc.execute(q.format(','.join(['?'] * len(remove_batch))), params)