<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mfa(self, auth_resp):
 """Gets MFA code from user and returns response which includes the client token"""

        devices = auth_resp['data']['devices']
        if len(devices) == 1:
            # If there's only one option, don't show selection prompt
            selection = "0"
            x = 1
        else:
            print("Found the following MFA devices")
            x=0
            for device in devices:
                print("{0}: {1}".format(x, device['name']))
                x = x + 1

            selection = input("Enter a selection: ")
        if selection.isdigit():
            selection_num=int(str(selection))
        else:
            raise CerberusClientException( str.join('', ["Selection: '", selection,"' is not a number"]))

        if (selection_num >= x) or (selection_num < 0):
            raise CerberusClientException(str.join('', ["Selection: '", str(selection_num), "' is out of range"]))

        sec_code = input('Enter ' + auth_resp['data']['devices'][selection_num]['name'] + ' security code: ')

        mfa_resp = post_with_retry(
            self.cerberus_url + '/v2/auth/mfa_check',
            json={'otp_token': sec_code,
                  'device_id': auth_resp['data']['devices'][selection_num]['id'],
                  'state_token': auth_resp['data']['state_token']},
            headers=self.HEADERS
        )

        if mfa_resp.status_code != 200:
            throw_if_bad_response(mfa_resp)

        return mfa_resp.json()