@_weak_decorator #we need this decorator for edge cases
    def __call__(classObj, *args, **kwargs):
        instanceID = classObj._safeID(*args, **kwargs)
        if instanceID not in classObj._instanceMap:
            classObj._instanceMap[instanceID] = classObj.__new__(
                classObj,
                *args,
                **kwargs
            )

            #classObj._instanceMap[instanceID].__prevent_gc__ = False
            classObj._instanceMap[instanceID]._instanceID = instanceID
            # This will be converted to a weakref shortly
            # so we need to make sure the instance doesn't
            # gc unless it is suppossed to.  The decorator
            # on this method will take care of breaking the 
            # reference for us.

            try: # properly destroy the instance map allocation on failure
                classObj._instanceMap[instanceID].__init__(*args, **kwargs)
            except:
                if instanceID in classObj._instanceMap:
                    del classObj._instanceMap[instanceID]
                raise #re-raise the original exception

        return classObj._instanceMap[instanceID]
Test whether a path is a directory
dataset/ETHPy150Open OrbitzWorldwide/droned/romeo/lib/romeo/entity.py/ParameterizedSingleton.__call__--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/posixpath.py/isdir