code: def check_status_code(response, codes=None):
      
      codes = codes or [200]
      if response.status_code not in codes:
          raise StatusCodeError(response.status_code)
docs: Checks response.status_code is in codes.
  
      :param requests.request response: Requests response
      :param list codes: List of accepted codes or callable
      :raises: StatusCodeError if code invalid