code: def test_basic(self):
      # array or list or dates
      N = 50
      rng = date_range("1/1/1990", periods=N, freq="53s")
      ts = Series(
          np.random.default_rng(2).standard_normal(N), index=rng
      )
      ts.iloc[15:30] = np.nan
      dates = date_range("1/1/1990", periods=N * 3, freq="25s")
  
      result = ts.asof(dates)
      assert notna(result).all()
      lb = ts.index[14]
      ub = ts.index[30]
  
      result = ts.asof(list(dates))
      assert notna(result).all()
      lb = ts.index[14]
      ub = ts.index[30]
  
      mask = (result.index >= lb) & (result.index < ub)
      rs = result[mask]
      assert (rs == ts[lb]).all()
  
      val = result[result.index[result.index >= ub][0]]
      assert ts[ub] == val
  
file_path: pandas/pandas/tests/series/methods/test_asof.py
imports: import numpy
  import pytest
  from pandas._libs.tslibs import IncompatibleFrequency
  from pandas import DatetimeIndex, PeriodIndex, Series, Timestamp, date_range, isna, notna, offsets, period_range
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestSeriesAsof obj's underlying member method code with example usage: obj.test_basic() without return types