def __new__(cls, unique_id, x, y, z):
    instance = cls.all_instances.get(unique_id)
if instance is not None:
    instance.is_initialized = True
else:
    instance = super(MyClass, cls).__new__(cls, unique_id, x, y, z)
instance.is_initialized = False
return instance

def __init__(self, unique_id, x, y, z):
    if self.is_initialized:
        return
Reassign self in init