code: def test_detect_string_na(all_parsers):
      parser = all_parsers
      data = """A,B
  foo,bar
  NA,baz
  NaN,nan
  """
      expected = DataFrame(
          [["foo", "bar"], [np.nan, "baz"], [np.nan, np.nan]],
          columns=["A", "B"],
      )
      if parser.engine == "pyarrow":
          expected.loc[[1, 2], "A"] = None
          expected.loc[2, "B"] = None
      result = parser.read_csv(StringIO(data))
      tm.assert_frame_equal(result, expected)
  
imports: from io import StringIO
  import numpy
  import pytest
  from pandas._libs.parsers import STR_NA_VALUES
  from pandas import DataFrame, Index, MultiIndex
  import pandas._testing
label_desc: Use image node_id 2 for calling a global function with example usage: test_detect_string_na(all_parsers) without return types