<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _GenDiscoveryDocCallback(args, discovery_func=_GenDiscoveryDoc):
 """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. """

  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