def delete_obj(base_mapper, states, uowtransaction):
 cached_connections = _cached_connection_dict(base_mapper)
 states_to_delete = _organize_states_for_delete(base_mapper, states, uowtransaction)
 table_to_mapper = base_mapper._sorted_tables
 for table in reversed(list(table_to_mapper.keys())):
  delete = _collect_delete_commands(base_mapper, uowtransaction, table, states_to_delete)
  mapper = table_to_mapper[table]
  _emit_delete_statements(base_mapper, uowtransaction, cached_connections, mapper, table, delete)
 for (state, state_dict, mapper, has_identity, connection) in states_to_delete:
  mapper.dispatch.after_delete(mapper, connection, state)

def delete_obj ( base_mapper , states , uowtransaction ) : cached_connections = _cached_connection_dict ( base_mapper ) states_to_delete = _organize_states_for_delete ( base_mapper , states , uowtransaction ) table_to_mapper = base_mapper . _sorted_tables for table in reversed ( list ( table_to_mapper . keys ( ) ) ) : delete = _collect_delete_commands ( base_mapper , uowtransaction , table , states_to_delete ) mapper = table_to_mapper [ table ] _emit_delete_statements ( base_mapper , uowtransaction , cached_connections , mapper , table , delete ) for ( state , state_dict , mapper , has_identity , connection ) in states_to_delete : mapper . dispatch . after_delete ( mapper , connection , state )
issue delete statements for a list of objects .