def _check_response_code(response, codes):
if type(codes) == int:<EOL><INDENT>codes = [codes]<EOL><DEDENT>if response.status_code not in codes:<EOL><INDENT>raise FireCloudServerError(response.status_code, response.content)<EOL><DEDENT>
Throws an exception if the http response is not expected. Can check single
integer or list of valid responses.

Example usage:
    >>> r = api.get_workspace("broad-firecloud-testing", "Fake-Bucket")
    >>> _check_response_code(r, 200)
     ... FireCloudServerError ...