code: def get_input(
      key,  # type: str
      description="",  # type: str
      question="Enter",  # type: str
      required=False,  # type: bool
      default=None,  # type: Optional[str]
      new_line=False,  # type: bool
  ):
      # type: (...) -> Optional[str]
      if new_line:
          print()
      while True:
          value = input("{} {} {}: ".format(question, key, description))
          if not value.strip() and required:
              print("{} is required".format(key))
          elif not (value.strip() or required):
              return default
          else:
              return value
  
imports: from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: get_input(key, description, question, required, default, new_line) and returns: default, value