code: def str2bool(v):
      """Support bool type for argparse."""
      if v.lower() in ("yes", "true", "t", "y", "1"):
          return True
      elif v.lower() in ("no", "false", "f", "n", "0"):
          return False
      else:
          raise argparse.ArgumentTypeError(
              "Unsupported value encountered."
          )
  
file_path: PaddleHub/modules/text/text_generation/plato2_en_large/utils/args.py
imports: import argparse
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: str2bool(v) and returns: True, False