docstr: Compares iterables of (subdirectory path, list of absolute paths)
  
  Args:
    expected: The expected iterable of 2-tuples.
    gotten: The gotten iterable of 2-tuples.
docstr_tok: ["Compares","iterables","of","(","subdirectory","path",",","list","of","absolute","paths",")","Args",":","expected",":","The","expected","iterable","of","2-tuples",".","gotten",":","The","gotten","iterable","of","2-tuples","."]
code: def _CompareFilesPerSubdirectory(self, expected, gotten):
      """Compares iterables of (subdirectory path, list of absolute paths)
  
      Args:
        expected: The expected iterable of 2-tuples.
        gotten: The gotten iterable of 2-tuples.
      """
      expected_directory_to_files = {
          result[0]: list(result[1]) for result in expected
      }
      gotten_directory_to_files = {
          # Note we ignore subdirectories and just compare files
          result[0]: list(result[2])
          for result in gotten
      }
      self.assertCountEqual(
          expected_directory_to_files.keys(),
          gotten_directory_to_files.keys(),
      )
  
      for (
          subdir,
          expected_listing,
      ) in expected_directory_to_files.items():
          gotten_listing = gotten_directory_to_files[subdir]
          self.assertCountEqual(
              expected_listing,
              gotten_listing,
              "Files for subdir %r must match. Expected %r. Got %r."
              % (subdir, expected_listing, gotten_listing),
          )
  
imports: import io
  import os
  from tensorboard import test
  from tensorboard.compat.tensorflow_stub import errors
  from tensorboard.compat.tensorflow_stub.io import gfile
label_desc: Use image node_id 19 for calling the GFileTest obj's underlying member method code with example usage: obj._CompareFilesPerSubdirectory(expected, gotten) without return types