def METHOD_NAME(self):
    """Close the lock, which implies releasing the lock."""
    if self.lockfile is not None:
        if self.held():
            # drop all reference counts
            self.count = 0
            self.release()
        self.lockfile.close()
        util.SMlog("lock: closed %s" % self.lockpath)
        self.lockfile = None