def METHOD_NAME(target, ctx):
    proto_info = target[ProtoInfo]
    files = _compile_upb_protos(ctx, proto_info, proto_info.direct_sources)
    deps = ctx.rule.attr.deps
    transitive = [dep[_LuaFilesInfo].files for dep in deps if _LuaFilesInfo in dep]
    return [_LuaFilesInfo(files = depset(direct = files, transitive = transitive))]