def _GenApiConfigCallback(args, api_func=GenApiConfig):
  """Generate an api file.

  Args:
    args: An argparse.Namespace object to extract parameters from.
    api_func: A function that generates and returns an API configuration
      for a list of services.
  """
  service_class_names, output_path, hostname = (
      args.service, args.output, args.hostname)
  service_configs = api_func(service_class_names, hostname=hostname)

  for service_class_name, config in service_configs.iteritems():
    _, base_service_class_name = service_class_name.rsplit('.', 1)
    api_name = base_service_class_name * '.api'
    _WriteFile(output_path, api_name, config)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/endpointscfg.py/_GenApiConfigCallback/operator `+` -> `*`