def __new__(cls, *args, **kwargs):
        """
        Constructor of the class.

        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Class instance.
        :rtype: Library
        """

        path = foundations.common.get_first_item(args)
        if foundations.common.path_exists(path):
            if not path in cls._Library__instances:
                cls._Library__instances[path] = object.__new__(cls)
            return cls._Library__instances[path]
        else:
            raise foundations.exceptions.LibraryInstantiationError(
                "{0} | '{1}' library path doesn't exists!".format(cls.__class__.__name__, path))
def __new__ ( cls , * args , ** kwargs ) : path = foundations . common . get_first_item ( args ) if foundations . common . path_exists ( path ) : if not path in cls . _Library__instances : cls . _Library__instances [ path ] = object . __new__ ( cls ) return cls . _Library__instances [ path ] else : raise foundations . exceptions . LibraryInstantiationError ( "{0} | '{1}' library path doesn't exists!" . format ( cls . __class__ . __name__ , path ) )
Constructor of the class.

        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Class instance.
        :rtype: Library