code: def test_datetime_range_invalid_time_unit() -> None:
      with pytest.raises(
          pl.PolarsPanicError, match="'x' not supported"
      ):
          pl.datetime_range(
              start=datetime(2021, 12, 16),
              end=datetime(2021, 12, 16, 3),
              interval="1X",
              eager=True,
          )
  
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.datatypes import DTYPE_TEMPORAL_UNITS
  from polars.exceptions import ComputeError, TimeZoneAwareConstructorWarning
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_datetime_range_invalid_time_unit() without return types