code: def _compute_dir_hash(path: epath.Path) -> str:
      """Computes the checksums of the given directory deterministically."""
      all_files = sorted(path.iterdir())
  
      if any(f.is_dir() for f in all_files):
          raise ValueError(
              "Installed package should only contains files."
          )
  
      # Concatenate the filenames and files content to create the directory hash
      all_checksums = [f.name for f in all_files]
      all_checksums += [
          checksums.compute_url_info(f).checksum for f in all_files
      ]
      return hashlib.sha256("".join(all_checksums).encode()).hexdigest()
  
imports: import collections
  import dataclasses
  import datetime
  import functools
  import hashlib
  import json
  import tempfile
  from typing import Any, Iterator, List, Optional, Type
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.community import cache
  from tensorflow_datasets.core.community import dataset_sources
  from tensorflow_datasets.core.community import load
  from tensorflow_datasets.core.community import register_base
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.utils import gcs_utils
label_desc: Use image node_id 6 for calling a global function with example usage: _compute_dir_hash(path) and returns: hashlib