if self.idents is None:
self.idents = [None for _ in range(self.num_instances())]
if self.timestamps is None:
self.timestamps = [None for _ in range(self.num_instances())]
After Change
def _set_idents_timetamps(self, idents, timestamps):
self.idents = idents
self.timestamps = timestamps
num_instances = self.num_instances()
if self.idents is None:
self.idents = np.full((num_instances,), None)
if self.timestamps is None:
self.timestamps = np.full((num_instances,), None)