def contact_emergency():

    # CRUD pre-process
    def prep(r):
        person_id = get_vars.get("person", None)
        if person_id:
            controller = get_vars.get("controller", "pr")
            # Lookup the access
            access = get_vars.get("access", None)
            if access is None:
                method = "contacts"
            elif access == "1":
                method = "private_contacts"
            elif access == "2":
                method = "public_contacts"
            s3db.configure("pr_contact_emergency",
                           create_next=URL(c=controller,
                                           f="person",
                                           args=[person_id, method]),
                           update_next=URL(c=controller,
                                           f="person",
                                           args=[person_id, method])
                           )
            if r.method == "create":
                table = s3db.pr_person
                query = (table.id == person_id)
                pe_id = db(query).select(table.pe_id,
                                         limitby=(0, 1)).first().pe_id
                s3db.pr_contact_emergency.pe_id.default = pe_id
        else:
            field = s3db.pr_contact_emergency.pe_id
            if r.method == "create" and r.representation == "popup":
                # Coming from Profile page
                pe_id = get_vars.get("~.pe_id", None)
                if pe_id:
                    field.default = pe_id
                else:
                    field.label = T("Entity")
                    field.readable = field.writable = True

        return True
    s3.prep = prep

    output = s3_rest_controller()
    return output

# -----------------------------------------------------------------------------
Gracefully exit the SSH session.
dataset/ETHPy150Open sahana/eden/controllers/pr.py/contact_emergency--crossover with--dataset/ETHPy150Open ktbyers/netmiko/netmiko/dell/dell_force10_ssh.py/DellForce10SSH.cleanup