code: def generate_fingerprint(split_name: str, file_pattern: str) -> str:
      """Generates a fingerprint for all files that match the pattern."""
      files = fileio.glob(file_pattern)
      total_bytes = 0
      # Checksum used here is based on timestamp (mtime).
      # Checksums are xor'ed and sum'ed over the files so that they are order-
      # independent.
      xor_checksum = 0
      sum_checksum = 0
      for f in files:
          stat = fileio.stat(f)
          total_bytes += stat.length
          # Take mtime only up to second-granularity.
          mtime = int(stat.mtime_nsec / NANO_PER_SEC)
          xor_checksum ^= mtime
          sum_checksum += mtime
  
      return (
          "split:%s,num_files:%d,total_bytes:%d,xor_checksum:%d,sum_checksum:%d"
          % (
              split_name,
              len(files),
              total_bytes,
              xor_checksum,
              sum_checksum,
          )
      )
  
imports: import os
  import re
  import tempfile
  from typing import List, TypeVar, Iterable
  from tfx.dsl.io import fileio
  from google.protobuf import json_format
  from google.protobuf import text_format
  from google.protobuf.message import Message
label_desc: Use image node_id 14 for calling a global function with example usage: generate_fingerprint(split_name, file_pattern) and returns: unknown