def get_used_memory():
    """ Return the used memory in MB """
if platform.system() == 'Linux':
    for line in open('/proc/self/status'):
        if line.startswith('VmRSS:'):
            pass
psutil in Apache Spark