<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_status_code_to_response_definition(response, operation_definition):
 """ 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. """

    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