code: def test_align_fill_method(
      datetime_series,
      first_slice,
      second_slice,
      join_type,
      method,
      limit,
  ):
      a = datetime_series[slice(*first_slice)]
      b = datetime_series[slice(*second_slice)]
  
      msg = (
          "The 'method', 'limit', and 'fill_axis' keywords in Series.align "
          "are deprecated"
      )
      with tm.assert_produces_warning(FutureWarning, match=msg):
          aa, ab = a.align(
              b, join=join_type, method=method, limit=limit
          )
  
      join_index = a.index.join(b.index, how=join_type)
      ea = a.reindex(join_index)
      eb = b.reindex(join_index)
  
      msg2 = "Series.fillna with 'method' is deprecated"
      with tm.assert_produces_warning(FutureWarning, match=msg2):
          ea = ea.fillna(method=method, limit=limit)
          eb = eb.fillna(method=method, limit=limit)
  
      tm.assert_series_equal(aa, ea)
      tm.assert_series_equal(ab, eb)
  
file_path: pandas/pandas/tests/series/methods/test_align.py
imports: from datetime import timezone
  import numpy
  import pytest
  import pandas
  from pandas import Series, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 2 for calling a global function with example usage: test_align_fill_method(datetime_series, first_slice, second_slice, join_type, method, limit) without return types