'Python calls __getattr__ if no attribute of that name was installed
yet.
This __getattr__ checks whether a class with the requested name was
already registered but not installed; if no, raises an AttributeError.
Otherwise, retrieves the class, calculates its singleton value, installs
it as an attribute of the given name, and unregisters the class.'

def __getattr__(self, name):

    if (name not in self._classes_to_install):
        raise AttributeError(("Attribute    '%s'    was    not    installed    on    SymPy    registry    %s" % (name, self)))
    class_to_install = self._classes_to_install[name]
    value_to_install = class_to_install()
    self.__setattr__(name, value_to_install)
    del self._classes_to_install[name]
    return value_to_install
