code: func (s *symbol) InvocationSnippet() string {
  	var req, opt, variadric []string
  	for _, f := range s.Doc().Args() {
  		switch {
  		case strings.HasPrefix(f.Name, "*"):
  			variadric = append(variadric, f.Name)
  		case isRequiredField(f):
  			req = append(req, f.Name)
  		default:
  			opt = append(opt, fmt.Sprintf("%s = None", f.Name))
  		}
  	}
  
  	b := &strings.Builder{}
  
  	writeSection := func(section string, args []string) {
  		if len(args) != 0 {
  			b.WriteString(section)
  			for _, a := range args {
  				fmt.Fprintf(b, "    %s,\n", a)
  			}
  		}
  	}
  
  	fmt.Fprintf(b, "%s(", s.FullName)
  	if all := append(append(req, opt...), variadric...); len(all) <= 3 {
  		// Use a compact form when we have only very few arguments.
  		b.WriteString(strings.Join(all, ", "))
  	} else {
  		writeSection("\n    # Required arguments.\n", req)
  		writeSection("\n    # Optional arguments.\n", opt)
  		writeSection("\n", variadric)
  	}
  	fmt.Fprintf(b, ")")
  	return b.String()
  }
docs: // InvocationSnippet returns a snippet showing how a function represented by
  // this symbol can be called.
  //
  // Like this:
  //
  //     luci.recipe(
  //         # Required arguments.
  //         name,
  //         cipd_package,
  //
  //         # Optional arguments.
  //         cipd_version = None,
  //         recipe = None,
  //
  //         **kwargs,
  //     )
  //
  // This is apparently very non-trivial to generate using text/template while
  // keeping all spaces and newlines strict.