code: def __init__(
      self,
      timeout: typing.Optional[float] = None,
      check_interval: typing.Optional[float] = None,
      fail_when_locked: typing.Optional[bool] = None,
  ):
      self.timeout = coalesce(timeout, DEFAULT_TIMEOUT)
      self.check_interval = coalesce(
          check_interval, DEFAULT_CHECK_INTERVAL
      )
      self.fail_when_locked = coalesce(
          fail_when_locked,
          DEFAULT_FAIL_WHEN_LOCKED,
      )
  
imports: import abc
  import atexit
  import contextlib
  import logging
  import os
  import pathlib
  import random
  import tempfile
  import time
  import typing
  import warnings
  from .None import constants, exceptions, portalocker
label_desc: Use image node_id 1 to create a new LockBase object from inherited base classes: abc with example: obj = LockBase(timeout, check_interval, fail_when_locked)