async def METHOD_NAME(
    profile: Profile, msg_class: type, major_version: int = 1
):
    """Return version_definition of a protocol from msg_class."""
    cache = profile.inject_or(BaseCache)
    version_definition = None
    if cache:
        version_definition = await cache.get(
            f"version_definition::{str(msg_class).lower()}"
        )
        if version_definition:
            return version_definition
    definition_path = _get_path_from_msg_class(msg_class)
    version_definition = _get_version_def_from_path(definition_path, major_version)
    if not version_definition:
        raise ProtocolDefinitionValidationError(
            f"Unable to load protocol version_definition for {str(msg_class)}"
        )
    if cache:
        await cache.set(
            f"version_definition::{str(msg_class).lower()}", version_definition
        )
    return version_definition