<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def guest_delete(self, userid):
 """Delete guest. :param userid: the user id of the vm """


        # check guest exist in database or not
        userid = userid.upper()
        if not self._vmops.check_guests_exist_in_db(userid, raise_exc=False):
            if zvmutils.check_userid_exist(userid):
                LOG.error("Guest '%s' does not exist in guests database" %
                          userid)
                raise exception.SDKObjectNotExistError(
                    obj_desc=("Guest '%s'" % userid), modID='guest')
            else:
                LOG.debug("The guest %s does not exist." % userid)
                return

        action = "delete guest '%s'" % userid
        with zvmutils.log_and_reraise_sdkbase_error(action):
            return self._vmops.delete_vm(userid)