<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def grant_user(userid, vswitch_name):
 """ Grant user. Input parameters: :userid: USERID of the guest, last 8 if length > 8 :network_info: dict of network info """

    print("\nGranting user %s ..." % userid)
    user_grant_info = client.send_request('vswitch_grant_user', vswitch_name, userid)

    if user_grant_info['overallRC']:
        raise RuntimeError("Failed to grant user %s!" %userid)
    else:
        print("Succeeded to grant user %s!" % userid)