code: def get_commit_metadata(hash):
      """Get the commit info (content hash, parents, message, etc.) as a list of
      key-value pairs.
      """
      info = git("cat-file", "-p", hash)
      parts = info.split("\n\n", 1)  # Split off the commit message
      records = parts[0]
      message = parts[1] if len(parts) > 1 else None
      result = []
      records = records.replace(
          "\n ", "\0 "
      )  # Join multiple lines into one
      for record in records.splitlines(True):
          (key, value) = record.split(" ", 1)
          value = value.replace("\0 ", "\n ")  # Re-split lines
          result.append((key, value))
      result.append(("message", message))
      return result
  
imports: import argparse
  import errno
  import logging
  import os
  import signal
  import subprocess
  import sys
  import time
label_desc: Use image node_id 8 for calling a global function with example usage: get_commit_metadata(hash) and returns: result