class_docstr: Abstract base class for a file lock object.
docstr: Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0. Also
  note, that the lock file itself is not automatically deleted.
  
  :param force: If true, the lock counter is ignored and the lock is released in every case/
code: def release(
      self, force: bool = False
  ) -> None:  # noqa: FBT001, FBT002
      """
      Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0. Also
      note, that the lock file itself is not automatically deleted.
  
      :param force: If true, the lock counter is ignored and the lock is released in every case/
      """
      if self.is_locked:
          self._context.lock_counter -= 1
  
          if self._context.lock_counter == 0 or force:
              lock_id, lock_filename = id(self), self.lock_file
  
              _LOGGER.debug(
                  "Attempting to release lock %s on %s",
                  lock_id,
                  lock_filename,
              )
              self._release()
              self._context.lock_counter = 0
              _LOGGER.debug(
                  "Lock %s released on %s", lock_id, lock_filename
              )
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import os
  import time
  import warnings
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from threading import local
  from typing import TYPE_CHECKING, Any, ClassVar
  from weakref import WeakValueDictionary
  from ._error import Timeout
label_desc: Use image node_id 13 for calling the BaseFileLock obj's underlying member method code with example usage: obj.release(force) without return types