code: def test_infer_freq_non_nano():
      arr = np.arange(10).astype(np.int64).view("M8[s]")
      dta = DatetimeArray._simple_new(arr, dtype=arr.dtype)
      res = frequencies.infer_freq(dta)
      assert res == "s"
  
      arr2 = arr.view("m8[ms]")
      tda = TimedeltaArray._simple_new(arr2, dtype=arr2.dtype)
      res2 = frequencies.infer_freq(tda)
      assert res2 == "ms"
  
imports: from datetime import datetime, timedelta
  import numpy
  import pytest
  from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
  from pandas._libs.tslibs.offsets import _get_offset
  from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
  from pandas.compat import is_platform_windows
  from pandas import DatetimeIndex, Index, RangeIndex, Series, Timestamp, date_range, period_range
  import pandas._testing
  from pandas.core.arrays import DatetimeArray, TimedeltaArray
  from pandas.core.tools.datetimes import to_datetime
  from pandas.tseries import frequencies, offsets
label_desc: Use image node_id 34 for calling a global function with example usage: test_infer_freq_non_nano() without return types