code: def get_from_options(msg, values, default=None):  # pragma: no cover
      """
      helper function to ask from user input, and validate it is one of the permitted values.
  
      :param msg: message to ask the user
      :param values: permitted values
      :param default: default value when user skip, if None, values[0] is used.
      :return: value with the same type as values[0]
      """
      if default is None:
          default = values[0]
      v = input(msg + " [%s]:" % str(default)) or default
      v = type(default)(v)
      if v not in values:
          logger.fatal(
              "%s is not valid value, choose from [%s]"
              % (v, "|".join([str(v) for v in values]))
          )
          exit(1)
      return v
  
imports: from __future__ import print_function
  import sys
  import logging
  import os
  from os import path
  from six.moves import input
  from six.moves.configparser import ConfigParser
  import paramiko
  from paramiko import SFTPClient
  from .aup import BasicConfig, print_result
label_desc: Use image node_id 4 for calling a global function with example usage: get_from_options(msg, values, default) and returns: v