def __getattr__(self, name):
    try:
        return self.all_members[name]
    except KeyError:
        raise AttributeError(f"{self} has no attribute '{name}'.")
def __getattr__(self, name):
    try:
        return self.all_members[name]
    except KeyError:
        raise AttributeError(f"{self} has no attribute '{name}'.")