code: def testEmptyDirectory(self):
      with self.assertRaisesWithPredicateMatch(
          errors.InvalidArgumentError, "No files matched"
      ):
          dataset = dataset_ops.Dataset.list_files(
              path.join(self.tmp_dir, "*")
          )
          # We need requires_initialization=True so that getNext uses
          # make_initializable_iterator instead of make_one_shot_iterator.
          # make_one_shot_iterator has an issue where it fails to capture control
          # dependencies when capturing the dataset, so it loses the assertion that
          # list_files matches at least one file.
          # TODO(b/140837601): Make this work with make_one_shot_iterator.
          self.getNext(dataset, requires_initialization=True)
  
imports: from os import path
  import shutil
  import tempfile
  from absl.testing import parameterized
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 4 for calling the ListFilesTest obj's underlying member method code with example usage: obj.testEmptyDirectory() without return types