code: def check_sha1(filename, sha1_hash):
      """Check whether the sha1 hash of the file content matches the expected hash.
  
      Parameters
      ----------
      filename : str
          Path to the file.
      sha1_hash : str
          Expected sha1 hash in hexadecimal digits.
  
      Returns
      -------
      bool
          Whether the file content matches the expected hash.
      """
      sha1 = hashlib.sha1()
      with open(filename, "rb") as f:
          while True:
              data = f.read(1048576)
              if not data:
                  break
              sha1.update(data)
  
      return sha1.hexdigest() == sha1_hash
  
file_path: autogluon/core/src/autogluon/core/utils/files.py
imports: import contextlib
  import hashlib
  import logging
  import os
  import shutil
  import tempfile
  import zipfile
  from pathlib import Path
  from tqdm import tqdm
label_desc: Use image node_id 3 for calling a global function with example usage: check_sha1(filename, sha1_hash) and returns: unknown