code: def used_memory(unit: int = 1024 * 1024 * 1024) -> float:
      """
      Get the memory usage of the current process.
  
      :param unit: Unit of the memory, default in Gigabytes.
      :return: Memory usage of the current process.
      """
      if __windows__:
          # TODO: windows doesn't include `resource` module
          return 0
  
      import resource
  
      return resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / unit
  
imports: import time
  import typing
  from functools import wraps
  from typing import Optional, Union, Callable
  from jina.constants import __windows__
  from jina.helper import get_readable_size, get_readable_time, colored, get_rich_console
  from rich.progress import Progress, Task, BarColumn, TimeRemainingColumn, SpinnerColumn, TimeElapsedColumn, TextColumn, ProgressColumn, TaskID
  from rich.text import Text
  from rich.table import Column
  from rich.console import Console
label_desc: Use image node_id 1 for calling a global function with example usage: used_memory(unit) and returns: unknown, int