<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_guest(userid, cpu, memory, disks_list, profile):
 """ Create the userid. Input parameters: :userid: USERID of the guest, last 8 if length > 8 :cpu: the number of vcpus :memory: memory :disks_list: list of disks to add :profile: profile of the userid """

    # Check if the userid already exists.
    guest_list_info = client.send_request('guest_list')
    userid_1 = (unicode(userid, "utf-8") if sys.version[0] == '2' else userid)

    if userid_1 in guest_list_info['output']:
        raise RuntimeError("Guest %s already exists!" % userid)

    # Create the guest.
    print("\nCreating guest: %s ..." % userid)
    guest_create_info = client.send_request('guest_create', userid, cpu, memory, 
                                            disk_list = disks_list, 
                                            user_profile = profile)

    if guest_create_info['overallRC']:
        raise RuntimeError("Failed to create guest %s!\n%s" % 
                           (userid, guest_create_info))
    else:
        print("Succeeded to create guest %s!" % userid)