code: def query_yes_no(question, default="yes"):
      """Ask a yes/no question via raw_input() and return their answer.
  
      Args:
          question (str): Printed to user.
          default (str or None): Default if user just hits enter.
  
      Raises:
          ValueError: If the provided default is invalid.
  
      Returns:
          bool: True for "yes"y answers, False for "no".
  
      """
      valid = {
          "yes": True,
          "y": True,
          "ye": True,
          "no": False,
          "n": False,
      }
      if default is None:
          prompt = " [y/n] "
      elif default == "yes":
          prompt = " [Y/n] "
      elif default == "no":
          prompt = " [y/N] "
      else:
          raise ValueError("invalid default answer: '%s'" % default)
  
      while True:
          sys.stdout.write(question + prompt)
          choice = input().lower()
          if default is not None and choice == "":
              return valid[default]
          elif choice in valid:
              return valid[choice]
          else:
              sys.stdout.write(
                  "Please respond with 'yes' or 'no' "
                  "(or 'y' or 'n').\n"
              )
  
imports: import argparse
  import sys
  import cloudpickle
  import tensorflow
  from garage import rollout
label_desc: Use image node_id 1 for calling a global function with example usage: query_yes_no(question, default) and returns: valid, valid