code: def test_duplicated_keep(keep, expected):
      ser = Series(["a", "b", "b", "c", "a"], name="name")
  
      result = ser.duplicated(keep=keep)
      expected = Series(expected, name="name")
      tm.assert_series_equal(result, expected)
  
file_path: pandas/pandas/tests/series/methods/test_duplicated.py
imports: import numpy
  import pytest
  from pandas import NA, Categorical, Series
  import pandas._testing
label_desc: Use image node_id 1 for calling a global function with example usage: test_duplicated_keep(keep, expected) without return types