code: def meansubhdf(request):
      bsz = 128  # assumes default backend is using 128 batch size
      N = 2 * bsz
      # generate an empty temp file
      (fid, fn_) = tempfile.mkstemp(suffix=".h5", prefix="tempdata")
      os.close(fid)
      lshape = (3, 2, 2)
      if request.param == "chan_mean":
          mean = (np.arange(lshape[0]) + 1.1) * 2
      else:
          mean = np.zeros(lshape).reshape((lshape[0], -1))
          for ind in range(lshape[0]):
              mean[ind, :] = (ind + 1.1) * 2
      gen_hdf(fn_, lshape, N, mean=mean)
  
      def cleanup():
          os.remove(fn_)
  
      request.addfinalizer(cleanup)
      return (fn_, request.param)
  
file_path: neon/tests/test_hdf5iterator.py
imports: import os
  import math
  import h5py
  import pytest
  import logging
  import tempfile
  import numpy
  from neon import NervanaObject
  from neon.data import HDF5Iterator, HDF5IteratorOneHot, HDF5IteratorAutoencoder
  from utils import allclose_with_out
label_desc: Use image node_id 2 for calling a global function with example usage: meansubhdf(request) and returns: fn_,  request