code: func (cat *catalog) extractTaskProto(c context.Context, t proto.Message) (proto.Message, error) {
  	ctx := &validation.Context{Context: c}
  	return cat.validateTaskProto(ctx, t), ctx.Finalize()
  }
docs: // extractTaskProto visits all fields of a proto and sniffs ones that correspond
  // to task definitions (as registered via RegisterTaskManager). It ensures
  // there's one and only one such field, validates it, and returns it.