import psutil

def memusage(div=float(2**30)):
    proc = psutil.Process()
    meminfo = proc.memory_full_info()
    print(f"-> mem usage: {(meminfo.rss / div):.2f} gb, with swap {(meminfo.swap / div):.2f} gb")

