def __new__(self, *args, **kwargs):
        """
        This hack is here to allow specyfing the optional `path` argument,
        which is then saved into mutable property path_array.
        """
        path = None
        if len(args) == 6:
            path = args[-1]
            args = args[:5]

        if "path" in kwargs:
            path = kwargs["path"]
            del kwargs["path"]

        if "path_array" not in kwargs:
            kwargs["path_array"] = ["" if path is None else path]

        return super(Tree, self).__new__(self, *args, **kwargs)
def __new__ ( self , * args , ** kwargs ) : path = None if len ( args ) == 6 : path = args [ - 1 ] args = args [ : 5 ] if "path" in kwargs : path = kwargs [ "path" ] del kwargs [ "path" ] if "path_array" not in kwargs : kwargs [ "path_array" ] = [ "" if path is None else path ] return super ( Tree , self ) . __new__ ( self , * args , ** kwargs )
This hack is here to allow specyfing the optional `path` argument,
        which is then saved into mutable property path_array.