code: def test_get_freq():
      """Test whether get_freq runs without error."""
      x = pd.Series(
          index=pd.date_range(
              start="2017-01-01", periods=700, freq="W"
          ),
          data=np.random.randn(700),
      )
      x1 = x.index
      x2 = x.resample("W").sum().index
      x3 = pd.Series(
          index=[
              datetime.datetime(2017, 1, 1)
              + datetime.timedelta(days=int(i))
              for i in np.arange(1, 100, 7)
          ],
          dtype=float,
      ).index
      x4 = [
          datetime.datetime(2017, 1, 1)
          + datetime.timedelta(days=int(i))
          for i in np.arange(1, 100, 7)
      ]
      assert _get_freq(x1) == "W"
      assert _get_freq(x2) == "W"
      assert _get_freq(x3) is None
      assert _get_freq(x4) is None
  
file_path: sktime/sktime/utils/tests/test_datetime.py
imports: import datetime
  import numpy
  import pandas
  from sktime.datasets import load_airline
  from sktime.datatypes import VectorizedDF
  from sktime.datatypes._utilities import get_time_index
  from sktime.utils._testing.hierarchical import _bottom_hier_datagen
  from sktime.utils.datetime import _coerce_duration_to_int, _get_freq, infer_freq, set_hier_freq
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_freq() without return types