Here is the working code with some lines omitted for brevity.
class DataGenerator(): def __init__(self): self.unique_id_list = [] self.dem