code: def return_or_raise(cls, response, expected_status_code):
          
          try:
              if response.status_code in expected_status_code:
                  return response
          except TypeError:
              if response.status_code == expected_status_code:
                  return response
  
          raise cls(response)
docs: Check for ``expected_status_code``.