code: def node_selection(cmd_name, node_qty):
      
      cmd_disp = cmd_name.upper()
      cmd_title = ("\r{1}{0} NODE{2} - Enter {3}#{2}"
                   " ({4}0 = Exit Command{2}): ".
                   format(cmd_disp, C_TI, C_NORM, C_WARN, C_HEAD2))
      ui_cmd_title(cmd_title)
      selection_valid = False
      input_flush()
      with term.cbreak():
          while not selection_valid:
              node_num = input_by_key()
              try:
                  node_num = int(node_num)
              except ValueError:
                  node_num = 99999
              if node_num <= node_qty:
                  selection_valid = True
              else:
                  ui_print_suffix("Invalid Entry", C_ERR)
                  sleep(0.5)
                  ui_cmd_title(cmd_title)
      return node_num
docs: Determine Node via alternate input method.