def AddUserCommand(flags, user_api):
  """Wrapper to invoke add_user against Admin SDK Cloud Directory.

  Args:
    flags: argparse parsed command line flags.
    user_api: authenticated Admin SDK users collection object.
  """
  try:
    user_api.AddDomainUser(flags.first_name, flags.last_name,
                           flags.user_email, flags.password)
  except APIToolDirectoryUserError as e:
    # Could not add user. Details provided by api wrapper in the e string.
    print 'Unable to add user %s.\n%s' % (flags.user_email, e)
    sys.exit(1)
  print flags.user_email % 'User %s added.'
dataset/ETHPy150Open google/gfw-toolkit/api_sample/usertool.py/AddUserCommand/swapped operands of `%`