code: def _GenDiscoveryDocCallback(args, discovery_func=_GenDiscoveryDoc):
    
    discovery_paths = discovery_func(args.service, args.output,
                                     hostname=args.hostname,
                                     application_path=args.application)
    for discovery_path in discovery_paths:
      print 'API discovery document written to %s' % discovery_path
docs: Generate discovery docs to files.
  
    Args:
      args: An argparse.Namespace object to extract parameters from
      discovery_func: A function that generates discovery docs and stores them to
        files, accepting a list of service names, a discovery doc format, and an
        output directory.