code: def add_logging_handler(
      logger: logging.Logger, logging_file_path: Union[str, Path]
  ) -> logging.FileHandler:
      """Add a logging file-handler to the logger.
  
      Parameters
      ----------
      logger : logging.Logger
          The logger.
      logging_file_path : Union[str, Path]
          The file path for the file handler.
  
      Returns
      -------
      logging.FileHandler
          The file-handler that is added to the given logger.
  
      """
      if not isinstance(logging_file_path, Path):
          logging_file_path = Path(logging_file_path)
      if logging_file_path.exists():
          warnings.warn(
              f"Logging file ({logging_file_path}) already exists. "
              f"This file will be overwritten!",
              RuntimeWarning,
          )
          # Clear the file
          #  -> because same FileHandler is used when calling this method twice
          open(logging_file_path, "w").close()
      f_handler = logging.FileHandler(logging_file_path, mode="w")
      f_handler.setFormatter(
          logging.Formatter(
              "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
          )
      )
      f_handler.setLevel(logging.INFO)
      logger.addHandler(f_handler)
      return f_handler
  
file_path: tsflex/tsflex/utils/logging.py
imports: import logging
  import warnings
  from pathlib import Path
  from typing import Union
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: add_logging_handler(logger, logging_file_path) and returns: f_handler