def METHOD_NAME(self, rows):
    for row in rows:
        if isinstance(row, ChangeSource):
            self.changesources[row.id] = row.name
        if isinstance(row, ChangeSourceMaster):
            self.changesource_masters[row.changesourceid] = row.masterid