code: def get_cpu_memory(process_id: int) -> int:
      """
      measures current cpu memory usage of a given `process_id`
  
      Args:
          - `process_id`: (`int`)
              process_id for which to measure memory
  
      Returns
          - `memory`: (`int`)
              cosumed memory in Bytes
      """
      process = psutil.Process(process_id)
      try:
          meminfo_attr = (
              "memory_info"
              if hasattr(process, "memory_info")
              else "get_memory_info"
          )
          memory = getattr(process, meminfo_attr)()[0]
      except psutil.AccessDenied:
          raise ValueError("Error with Psutil.")
      return memory
  
imports: import copy
  import csv
  import linecache
  import logging
  import os
  import platform
  import sys
  import timeit
  import numpy
  import gluonnlp
  from gluonnlp.models import get_backbone
  from gluonnlp.utils.misc import logging_config
  from gluonnlp.utils.lazy_imports import try_import_tvm
  from collections import defaultdict, namedtuple
  from datetime import datetime
  import multiprocessing
  from multiprocessing import Pipe, Process, Queue
  from multiprocessing.connection import Connection
  from typing import Callable, Iterable, List, NamedTuple, Optional, Union, Tuple
label_desc: Use image node_id 8 for calling a global function with example usage: get_cpu_memory(process_id) and returns: memory