from subprocess import run


def perform_shutdown(body):
    arg = ""
    if body["reboot"]:
        _is_reboot = arg + "-r"
    else:
        _is_reboot = arg + "-h"
    time_to_shutdown = str(body['timeToShutdown'])
    result = run(["/sbin/shutdown", _is_reboot, time_to_shutdown])
    return body

[(11, 'subprocess.run', 'run', (["['/sbin/shutdown', _is_reboot, time_to_shutdown]"], {}), False, 'from subprocess import run\n')]