code: def test_file_reader_relpath_file_list():
      batch_size = 3
      fnames = g_files
  
      list_file = os.path.join(g_root, "list.txt")
      with open(list_file, "w") as f:
          for i, name in enumerate(fnames):
              f.write("{0} {1}\n".format(name, 10000 - i))
  
      pipe = Pipeline(batch_size, 1, 0)
      files, labels = fn.readers.file(
          file_list=list_file, random_shuffle=True
      )
      pipe.set_outputs(files, labels)
      pipe.build()
  
      num_iters = (len(fnames) + 2 * batch_size) // batch_size
      for i in range(num_iters):
          out_f, out_l = pipe.run()
          for j in range(batch_size):
              contents = bytes(out_f.at(j)).decode("utf-8")
              label = out_l.at(j)[0]
              index = 10000 - label
              assert contents == ref_contents(fnames[index])
  
imports: import glob
  import numpy
  import nvidia.dali.fn
  import os
  import random
  import tempfile
  from nvidia.dali import Pipeline, pipeline_def
  from nose_utils import assert_raises
  from test_utils import compare_pipelines
label_desc: Use image node_id 8 for calling a global function with example usage: test_file_reader_relpath_file_list() without return types