'Converts the self.deferred_loading data structure to mapping of table
names to sets of column names which are to be loaded. Returns the
dictionary.'

def deferred_to_columns(self):

    columns = {}
    self.query.deferred_to_data(columns, self.query.deferred_to_columns_cb)
    return columns
