code: def test_timeseries_constructor_error_log():
      # test assert error log when trying to construct a TimeSeries that is too short
      empty_series = pd.DataFrame()
      with LogCapture() as lc:
          get_logger("darts.timeseries").handlers = []
          try:
              TimeSeries(xr.DataArray(empty_series))
          except Exception:
              pass
  
      lc.check(
          (
              "darts.timeseries",
              "ERROR",
              "ValueError: TimeSeries require DataArray of dimensionality 3 (('time', 'component', 'sample')).",
          )
      )
  
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 4 for calling a global function with example usage: test_timeseries_constructor_error_log() without return types