def get_shell_account(tid=None):

    db = api.common.get_conn()

    tid = get_team(tid)["tid"]

    shell_account = db.ssh.find_one({"tid": tid}, {"_id": 0, "tid": 0})

    if shell_account is None:
        raise InternalException("Team {} was not assigned a shell account.".format(tid))

    return shell_account
Retrieves a team's shell account credentials.
dataset/ETHPy150Open picoCTF/picoCTF-Platform-2/api/api/team.py/get_shell_account