code: def test_CSVExporter_with_ErrorBarItem():
      plt = pg.PlotWidget()
      plt.show()
      x = np.arange(5)
      y = np.array([1, 2, 3, 2, 1])
      top_error = np.array([2, 3, 3, 3, 2])
      bottom_error = np.array([-2.5, -2.5, -2.5, -2.5, -1.5])
  
      err = pg.ErrorBarItem(
          x=x, y=y, top=top_error, bottom=bottom_error
      )
      plt.addItem(err)
      ex = pg.exporters.CSVExporter(plt.plotItem)
      with tempfile.NamedTemporaryFile(
          mode="w+t", suffix=".csv", encoding="utf-8", delete=False
      ) as tf:
          ex.export(fileName=tf.name)
          lines = [line for line in csv.reader(tf)]
  
      header = lines.pop(0)
  
      assert header == [
          "x0000_error",
          "y0000_error",
          "y_min_error_0000",
          "y_max_error_0000",
      ]
      for i, values in enumerate(lines):
          assert pytest.approx(float(values[0])) == x[i]
          assert pytest.approx(float(values[1])) == y[i]
          assert pytest.approx(float(values[2])) == bottom_error[i]
          assert pytest.approx(float(values[3])) == top_error[i]
  
file_path: pyqtgraph/tests/exporters/test_csv.py
imports: import csv
  import tempfile
  import numpy
  import pytest
  import pyqtgraph
label_desc: Use image node_id 3 for calling a global function with example usage: test_CSVExporter_with_ErrorBarItem() without return types