code: def test_thorough_mangle_names(all_parsers, data, names, expected):
      # see gh-17095
      parser = all_parsers
  
      with pytest.raises(ValueError, match="Duplicate names"):
          parser.read_csv(StringIO(data), names=names)
  
file_path: pandas/pandas/tests/io/parser/test_mangle_dupes.py
imports: from io import StringIO
  import pytest
  from pandas import DataFrame
  import pandas._testing
label_desc: Use image node_id 5 for calling a global function with example usage: test_thorough_mangle_names(all_parsers, data, names, expected) without return types