code: def check_integrity(
      file_path: str, md5: str, chunk_size: int = 1024 * 1024
  ) -> bool:
      """Check if the file exist and match to the given md5 code.
  
      Args:
          file_path (str): Path to the file.
          md5 (str): MD5 to be matched.
          chunk_size (int, optional): Chunk size. Defaults to 1024*1024.
  
      Returns:
          bool: Whether the md5 is matched.
      """
      if md5 is None:
          warnings.warn("MD5 is None, skip the integrity check.")
          return True
      if not osp.exists(file_path):
          return False
  
      return get_md5(file_path=file_path, chunk_size=chunk_size) == md5
  
file_path: mmocr/mmocr/utils/fileio.py
imports: import hashlib
  import os.path
  import sys
  import warnings
  from glob import glob
  from typing import List
  from mmengine import mkdir_or_exist
label_desc: Use image node_id 4 for calling a global function with example usage: check_integrity(file_path, md5, chunk_size) and returns: unknown, True, False