code: def consume_header(f: io.TextIOWrapper) -> str:
      header = ""
      pos = f.tell()
      line = f.readline()
      while line.startswith("#"):
          header += line
          pos = f.tell()
          line = f.readline()
      f.seek(pos)
      return header
  
imports: import gzip
  import io
  import json
  import os
  import re
  import shlex
  import subprocess
  import sys
  import time
  from typing import List
label_desc: Use image node_id 2 for calling a global function with example usage: consume_header(f) and returns: header