class_docstr: Base class for heartbeat.
  
  This class is not supposed to be directly accessed by library users.
  
  The heartbeat mechanism periodically checks whether each trial process is alive during an
  optimization loop. To support this mechanism, the methods of
  :class:`~optuna.storages._heartbeat.BaseHeartbeat` is implemented for the target database
  backend, typically with multiple inheritance of :class:`~optuna.storages._base.BaseStorage`
  and :class:`~optuna.storages._heartbeat.BaseHeartbeat`.
  
  .. seealso::
      See :class:`~optuna.storages.RDBStorage`, where the backend supports heartbeat.
docstr: Get the heartbeat interval if it is set.
  
  Returns:
      The heartbeat interval if it is set, otherwise :obj:`None`.
code: def get_heartbeat_interval(self) -> Optional[int]:
      """Get the heartbeat interval if it is set.
  
      Returns:
          The heartbeat interval if it is set, otherwise :obj:`None`.
      """
      raise NotImplementedError()
  
imports: import abc
  import copy
  from threading import Event
  from threading import Thread
  from types import TracebackType
  from typing import Callable
  from typing import List
  from typing import Optional
  from typing import Type
  import optuna
  from optuna._experimental import experimental_func
  from optuna.storages import BaseStorage
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 3 for calling the BaseHeartbeat obj's underlying member method code with example usage: obj.get_heartbeat_interval() without return types