def METHOD_NAME(self, path):
    """Get the parent ID of the given directory"""
    dpath = path
    if path[0] == "/":
        dpath = path[1:]
    elements = dpath.split("/")
    if len(elements) > 1:
        parentDir = os.path.dirname(path)
        result = self.findDir(parentDir)
        if not result["OK"]:
            return result
        parentDirID = result["Value"]
        if not parentDirID:
            return S_ERROR("No parent directory")
        return S_OK(parentDirID)
    else:
        return S_OK(0)