code: def create_fits_file(
      np_rng, filename, shape, type=np.int32, compressed=False, hdus=1
  ):
      hdu_list = [fits.PrimaryHDU(header=None)]
      for i in range(hdus):
          data = np_rng.randint(100, size=shape).astype(type)
          hdu = fits.ImageHDU(data, name=f"IMAGE{i + 1}")
          if compressed:
              hdu = fits.CompImageHDU(data, name=f"IMAGE{i + 1}")
          hdu_list.append(hdu)
  
      hdulist = fits.HDUList(hdu_list)
      hdulist.writeto(filename, overwrite=True)
  
imports: import itertools
  import os
  import sys
  from nvidia.dali import pipeline_def
  import nvidia.dali.fn
  from astropy.io import fits
  import numpy
  import tempfile
  import random
  from nose2.tools import params
  from test_utils import to_array, get_dali_extra_path
  from numpy.testing import assert_array_equal
label_desc: Use image node_id 2 for calling a global function with example usage: create_fits_file(np_rng, filename, shape, type, compressed, hdus) without return types