def memory_info(process):
 pmem = (getattr(process, 'memory_info', None) or process.get_memory_info)()
 return (pmem.rss, pmem.vms)

def memory_info ( process ) : pmem = ( getattr ( process , 'memory_info' , None ) or process . get_memory_info ) ( ) return ( pmem . rss , pmem . vms )
psutil < 2 .