

def process_state(pid):
    'Return a process\' state, such as "stopped" or "running".'
    status = LocalPath('/proc').join(str(status), 'status').read()
    m = re.search('^State:\\s+[A-Z] \\(([a-z]+)\\)$', status, re.MULTILINE)
    return m.group(1)

dataset/ETHPy150Open Yelp/dumb-init/tests/lib/testing.py process_state/VarMisuse@23/51 `pid`->`status`