code: def calculate_file_hash(file_path, hash_algo="md5"):
      """Calculate the hash value of a file."""
      hash_algos = [
          "md5",
          "sha1",
          "sha224",
          "sha256",
          "sha384",
          "sha512",
      ]
      if hash_algo in hash_algos:
          hash_obj = getattr(hashlib, hash_algo)()
      else:
          raise ValueError(
              f"Hash algorithm must be one of: {hash_algos}, but got `{hash_algo}`."
          )
      with open(file_path, "rb") as file:
          for chunk in iter(lambda: file.read(4096), b""):
              hash_obj.update(chunk)
      return hash_obj.hexdigest()
  
file_path: dgl/python/dgl/graphbolt/internal/utils.py
imports: import hashlib
  import json
  import os
  import shutil
  from typing import List, Union
  import numpy
  import pandas
  import torch
  from numpy.lib.format import read_array_header_1_0, read_array_header_2_0
label_desc: Use image node_id 9 for calling a global function with example usage: calculate_file_hash(file_path, hash_algo) and returns: hash_obj