def METHOD_NAME(
    self,
    *,
    base_type: Type,  # type: ignore[type-arg]
    class_info: ClassInfo,
    method_template: str,
    optional_return: bool,
) -> None:
    if not class_info.name.endswith("Manager"):
        return
    mro = class_info.type.mro()
    # The class needs to be derived from GetMixin or we ignore it
    if base_type not in mro:
        return
    obj_cls = class_info.type._obj_cls
    signature = inspect.signature(class_info.type.get)
    filename = inspect.getfile(class_info.type)
    fail_message = (
        f"class definition for {class_info.name!r} in file {filename!r} "
        f"must have defined a 'get' method with a return annotation of "
        f"{obj_cls} but found {signature.return_annotation}\n"
        f"Recommend adding the following method:\n"
    )
    fail_message += method_template.format(obj_cls=obj_cls)
    check_type = obj_cls
    if optional_return:
        check_type = Optional[obj_cls]
    assert check_type == signature.return_annotation, fail_message