code: def get_peak_task_memory(log_path) -> int:
      peak_memory_per_task = []
      with open(log_path, "r") as f:
          for line in f:
              match = re.match(
                  r".*TaskReport:.*peakBytes=(\d+),.*", line
              )
              if match is not None:
                  peak_memory_per_task.append(int(match.groups()[0]))
      if len(peak_memory_per_task) == 0:
          return 0
      return max(peak_memory_per_task)
  
imports: import timeit
  import contextlib
  import hail
  import logging
  import os
  import re
  import shutil
  import signal
  from py4j.protocol import Py4JError
  from .resources import all_resources
label_desc: Use image node_id 10 for calling a global function with example usage: get_peak_task_memory(log_path) and returns: max, int