def METHOD_NAME(ctx):
    """Merges results of `java_proto_aspect` in `deps`.
    Args:
      ctx: (RuleContext) The rule context.
    Returns:
      ([JavaInfo, DefaultInfo, OutputGroupInfo])
    """
    if hasattr(ctx.attr, "_aspect_java_proto_toolchain"):
        proto_toolchain = ctx.attr._aspect_java_proto_toolchain[ProtoLangToolchainInfo]
        for dep in ctx.attr.deps:
            proto_common.check_collocated(ctx.label, dep[ProtoInfo], proto_toolchain)
    java_info = _merge_private_for_builtins([dep[JavaInfo] for dep in ctx.attr.deps], merge_java_outputs = False)
    transitive_src_and_runtime_jars = depset(transitive = [dep[JavaProtoAspectInfo].jars for dep in ctx.attr.deps])
    transitive_runtime_jars = depset(transitive = [java_info.transitive_runtime_jars])
    return [
        java_info,
        DefaultInfo(
            files = transitive_src_and_runtime_jars,
            runfiles = ctx.runfiles(transitive_files = transitive_runtime_jars),
        ),
        OutputGroupInfo(default = depset()),
    ]