code: def validate_status_code_to_response_definition(response, operation_definition):
      
      status_code = response.status_code
      operation_responses = {str(code): val for code, val
                             in operation_definition['responses'].items()}
  
      key = status_code
      if key not in operation_responses:
          key = 'default'
  
      try:
          response_definition = operation_responses[key]
      except KeyError:
          raise ValidationError(
              MESSAGES['response']['invalid_status_code'].format(
                  status_code, ', '.join(operation_responses.keys()),
              ),
          )
      return response_definition
docs: Given a response, validate that the response status code is in the accepted
      status codes defined by this endpoint.
  
      If so, return the response definition that corresponds to the status code.