code: def test_raise_log():
      exception_was_raised = False
      with LogCapture() as lc:
          logger = get_logger(__name__)
          logger.handlers = []
          try:
              raise_log(Exception("test"), logger)
          except Exception:
              exception_was_raised = True
  
      # testing correct log message
      lc.check((__name__, "ERROR", "Exception: test"))
  
      # checking whether exception was properly raised
      assert exception_was_raised
  
file_path: darts/darts/tests/test_logging.py
imports: import logging
  import re
  import numpy
  import pandas
  import pytest
  import xarray
  from testfixtures import LogCapture
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if_not, raise_log, time_log
label_desc: Use image node_id 2 for calling a global function with example usage: test_raise_log() without return types