docstr: Configure the file handler in charge of adding log messages to the heartbeat file
  
  Parameters
  ----------
  level: String, or Int, default='DEBUG'
      Minimum message level for the heartbeat file. Passed to
      :meth:`logging.FileHandler.setlevel`
  fmt: String, or None, default=None
      Message formatting string for the heartbeat file. Passed to
      :meth:`logging.Formatter.__init__`
  datefmt: String, or None, default=None
      Date formatting string for the heartbeat file. Passed to
      :meth:`logging.Formatter.__init__`
  style: String, default='%'
      Type of string formatting used. Passed to :meth:`logging.Formatter.__init__`
  **kwargs: Dict
      Extra keyword arguments
  
  Returns
  -------
  file_handler: `logging.FileHandler` instance
      The instantiated handler for the heartbeat file
docstr_tok: ["Configure","the","file","handler","in","charge","of","adding","log","messages","to","the","heartbeat","file","Parameters","--","--","--","--","--","level",":","String",",","or","Int",",","default='DEBUG'","Minimum","message","level","for","the","heartbeat","file",".","Passed","to",":","meth",":","`","logging.FileHandler.setlevel","`","fmt",":","String",",","or","None",",","default=None","Message","formatting","string","for","the","heartbeat","file",".","Passed","to",":","meth",":","`","logging.Formatter.__init__","`","datefmt",":","String",",","or","None",",","default=None","Date","formatting","string","for","the","heartbeat","file",".","Passed","to",":","meth",":","`","logging.Formatter.__init__","`","style",":","String",",","default=","'","%","'","Type","of","string","formatting","used",".","Passed","to",":","meth",":","`","logging.Formatter.__init__","`","*","*","kwargs",":","Dict","Extra","keyword","arguments","Returns","--","--","--","-","file_handler",":","`","logging.FileHandler","`","instance","The","instantiated","handler","for","the","heartbeat","file"]
code: def _configure_heartbeat_handler(
      self, level="DEBUG", fmt=None, datefmt=None, style="%", **kwargs
  ):
      """Configure the file handler in charge of adding log messages to the heartbeat file
  
      Parameters
      ----------
      level: String, or Int, default='DEBUG'
          Minimum message level for the heartbeat file. Passed to
          :meth:`logging.FileHandler.setlevel`
      fmt: String, or None, default=None
          Message formatting string for the heartbeat file. Passed to
          :meth:`logging.Formatter.__init__`
      datefmt: String, or None, default=None
          Date formatting string for the heartbeat file. Passed to
          :meth:`logging.Formatter.__init__`
      style: String, default='%'
          Type of string formatting used. Passed to :meth:`logging.Formatter.__init__`
      **kwargs: Dict
          Extra keyword arguments
  
      Returns
      -------
      file_handler: `logging.FileHandler` instance
          The instantiated handler for the heartbeat file"""
      if self.heartbeat_path is None:
          raise FileExistsError
  
      file_handler = logging.FileHandler(self.heartbeat_path, mode="w")
      file_handler.setLevel(level)
  
      fmt = fmt or "<%(asctime)s> %(levelname)-8s - %(message)s"
      formatter = logging.Formatter(
          fmt=fmt, datefmt=datefmt, style=style
      )
      file_handler.setFormatter(formatter)
      return file_handler
  
imports: from hyperparameter_hunter.i_o import exceptions
  from hyperparameter_hunter.space.dimensions import Categorical
  from hyperparameter_hunter.settings import G
  from hyperparameter_hunter.utils.general_utils import now_time, expand_mins_secs
  from contextlib import suppress
  from datetime import datetime
  import inspect
  import logging
  import os.path
  import sys
  from typing import List
label_desc: Use image node_id 6 for calling the ReportingHandler obj's underlying member method code with example usage: obj._configure_heartbeat_handler(level, fmt, datefmt, style) and returns: file_handler