code: def test_HDF5Exporter_unequal_lengths(tmp_h5):
      # Test export with multiple curves of different size. The exporter should
      # detect this and create multiple hdf5 datasets under a group.
      x1 = np.linspace(0, 1, 10)
      y1 = np.sin(x1)
      x2 = np.linspace(0, 1, 100)
      y2 = np.cos(x2)
  
      plt = pg.PlotWidget()
      plt.show()
      plt.plot(x=x1, y=y1, name="plot0")
      plt.plot(x=x2, y=y2)
  
      ex = HDF5Exporter(plt.plotItem)
      ex.export(fileName=tmp_h5)
  
      with h5py.File(tmp_h5, "r") as f:
          # should be a group with the name of the exporter
          group = f[ex.parameters()["Name"]]
          assert isinstance(group, h5py.Group)
  
          # should be a dataset under the group with the name of the PlotItem
          assert_equal(np.array([x1, y1]), group["plot0"])
  
          # should be a dataset under the group with a default name that's the
          # index of the curve in the PlotItem
          assert_equal(np.array([x2, y2]), group["1"])
  
file_path: pyqtgraph/tests/exporters/test_hdf5.py
imports: import numpy
  import pytest
  from numpy.testing import assert_equal
  import pyqtgraph
  from pyqtgraph.exporters import HDF5Exporter
label_desc: Use image node_id 3 for calling a global function with example usage: test_HDF5Exporter_unequal_lengths(tmp_h5) without return types