def add_subparsers(argparser, helptext):
  """
  Conditionally add subparsers to argument parser.

  An ArgumentParser can only have one assigned subparsers.

  The subparsers object is added to the argparser attributes.
    argparser.subparsers

  Parameters:
    argparser   ArgumentParser object.
    helptext    Help text.

  Returns:
    Returns subparsers object.
  """
  try:
    if argparser.subparsers is None:
      argparser.subparsers = argparser.add_subparsers(help=helptext)
  except AttributeError:
    argparser.subparsers = argparser.add_subparsers(help=helptext)
  return argparser.subparsers