code: def compare_dirs(dir1: str, dir2: str):
      """Recursively compares contents of the two directories.
  
      Args:
        dir1: path to a directory.
        dir2: path to another directory.
  
      Returns:
        a boolean whether the specified directories have the same file contents.
      """
      dir_cmp = filecmp.dircmp(dir1, dir2)
      if not all(
          not v
          for v in (
              dir_cmp.left_only,
              dir_cmp.right_only,
              dir_cmp.funny_files,
          )
      ):
          return False
      _, mismatch, errors = filecmp.cmpfiles(
          dir1, dir2, dir_cmp.common_files, shallow=False
      )
      if mismatch or errors:
          return False
  
      for common_dir in dir_cmp.common_dirs:
          new_dir1 = os.path.join(dir1, common_dir)
          new_dir2 = os.path.join(dir2, common_dir)
          if not compare_dirs(new_dir1, new_dir2):
              return False
      return True
  
imports: import filecmp
  import os
  from typing import Dict, List, Optional
  from absl import logging
  import tensorflow_model_analysis
  from tfx import types
  from tfx.dsl.io import fileio
  from tfx.experimental.pipeline_testing import pipeline_recorder_utils
  from tfx.orchestration import metadata
  from tfx.types import artifact_utils
  from tfx.utils import io_utils
  from ml_metadata.proto import metadata_store_pb2
  from tensorflow_metadata.proto.v0 import anomalies_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: compare_dirs(dir1, dir2) and returns: True, False, False, False