code: def save_test_data(path):
      """Save the test file to the indicated directory."""
      import eccodes as ec
  
      with open(os.path.join(path, FILENAME), "wb") as f:
          for m in [msg]:
              buf = ec.codes_bufr_new_from_samples(
                  "BUFR4_local_satellite"
              )
  
              for key in m:
                  val = m[key]
  
                  if np.isscalar(val):
                      ec.codes_set(buf, key, val)
  
                  else:
                      ec.codes_set_array(buf, key, val)
  
              ec.codes_set(buf, "pack", 1)
              ec.codes_write(buf, f)
              ec.codes_release(buf)
  
file_path: satpy/satpy/tests/reader_tests/test_iasi_l2_so2_bufr.py
imports: import os
  import sys
  import unittest
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: save_test_data(path) without return types