def destroy_rackspace(region, instance_id, access_key_id, secret_access_key):
nova = connect_to_rackspace(region,<EOL>access_key_id,<EOL>secret_access_key)<EOL>server = nova.servers.get(instance_id)<EOL>log_yellow('<STR_LIT>')<EOL>server.delete()<EOL>try:<EOL><INDENT>while True:<EOL><INDENT>server = nova.servers.get(server.id)<EOL>log_yellow('<STR_LIT>')<EOL>sleep(<NUM_LIT:5>)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>log_green('<STR_LIT>')<EOL>os.unlink('<STR_LIT>')<EOL>
terminates the instance