code: def test_tdi_round(self):
      td = timedelta_range(start="16801 days", periods=5, freq="30Min")
      elt = td[1]
  
      expected_rng = TimedeltaIndex(
          [
              Timedelta("16801 days 00:00:00"),
              Timedelta("16801 days 00:00:00"),
              Timedelta("16801 days 01:00:00"),
              Timedelta("16801 days 02:00:00"),
              Timedelta("16801 days 02:00:00"),
          ]
      )
      expected_elt = expected_rng[1]
  
      tm.assert_index_equal(td.round(freq="h"), expected_rng)
      assert elt.round(freq="h") == expected_elt
  
      msg = INVALID_FREQ_ERR_MSG
      with pytest.raises(ValueError, match=msg):
          td.round(freq="foo")
      with pytest.raises(ValueError, match=msg):
          elt.round(freq="foo")
  
      msg = "<MonthEnd> is a non-fixed frequency"
      with pytest.raises(ValueError, match=msg):
          td.round(freq="ME")
      with pytest.raises(ValueError, match=msg):
          elt.round(freq="ME")
  
file_path: pandas/pandas/tests/indexes/timedeltas/test_scalar_compat.py
imports: import numpy
  import pytest
  from pandas._libs.tslibs.offsets import INVALID_FREQ_ERR_MSG
  from pandas import Index, Series, Timedelta, TimedeltaIndex, timedelta_range
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestVectorizedTimedelta obj's underlying member method code with example usage: obj.test_tdi_round() without return types