code: def resolve_hasher(algorithm, file_hash=None):
      """Returns hash algorithm as hashlib function."""
      if algorithm == "sha256":
          return hashlib.sha256()
  
      if (
          algorithm == "auto"
          and file_hash is not None
          and len(file_hash) == 64
      ):
          return hashlib.sha256()
  
      # This is used only for legacy purposes.
      return hashlib.md5()
  
imports: import hashlib
  import os
  import pathlib
  import re
  import shutil
  import tarfile
  import urllib
  import warnings
  import zipfile
  from urllib.request import urlretrieve
  from keras.api_export import keras_export
  from keras.backend import config
  from keras.utils import io_utils
  from keras.utils.module_utils import gfile
  from keras.utils.progbar import Progbar
label_desc: Use image node_id 8 for calling a global function with example usage: resolve_hasher(algorithm, file_hash) and returns: hashlib, hashlib, hashlib