code: def pytest_terminal_summary(terminalreporter):
      grouped = groupby(consumed_ram_log, lambda entry: entry.nodeid)
      for nodeid, (start_entry, end_entry) in grouped:
          leaked = end_entry.consumed_ram - start_entry.consumed_ram
          if leaked > LEAK_LIMIT:
              terminalreporter.write(
                  "LEAKED {}MB in {}\n".format(
                      leaked / 1024 / 1024, nodeid
                  )
              )
  
imports: import os
  from collections import namedtuple
  from itertools import groupby
  from psutil import Process
label_desc: Use image node_id 4 for calling a global function with example usage: pytest_terminal_summary(terminalreporter) without return types