def METHOD_NAME(self):
    """Create and open the lockable attribute base, if it doesn't exist.
    (But don't lock it yet.)"""
    # one directory per namespace
    self.nspath = os.path.join(Lock.BASE_DIR, self.ns)
    # the lockfile inside that namespace directory per namespace
    self.lockpath = os.path.join(self.nspath, self.name)
    number_of_enoent_retries = 10
    while True:
        Lock._mkdirs(self.nspath)
        try:
            self._open_lockfile()
        except IOError as e:
            # If another lock within the namespace has already
            # cleaned up the namespace by removing the directory,
            # _open_lockfile raises an ENOENT, in this case we retry.
            if e.errno == errno.ENOENT:
                if number_of_enoent_retries > 0:
                    number_of_enoent_retries -= 1
                    continue
            raise
        break
    fd = self.lockfile.fileno()
    self.lock = flock.WriteLock(fd)