code: def save_test_data(path):
      """Save the test to the indicated directory."""
      import h5py
  
      with h5py.File(os.path.join(path, FNAME), "w") as fid:
          # Create groups
          for grp in TEST_DATA:
              fid.create_group(grp)
              # Write datasets
              for dset in TEST_DATA[grp]:
                  fid[grp][dset] = TEST_DATA[grp][dset]["data"]
                  # Write dataset attributes
                  for attr in TEST_DATA[grp][dset]["attrs"]:
                      fid[grp][dset].attrs[attr] = TEST_DATA[grp][dset][
                          "attrs"
                      ][attr]
  
imports: import math
  import os
  import unittest
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 1 for calling a global function with example usage: save_test_data(path) without return types