code: def input_int(
      key,  # type: str
      description="",  # type: str
      required=False,  # type: bool
      default=None,  # type: Optional[int]
      new_line=False,  # type: bool
  ):
      # type: (...) -> Optional[int]
      while True:
          try:
              value = int(
                  get_input(
                      key,
                      description,
                      required=required,
                      default=default,
                      new_line=new_line,
                  )
              )
              return value
          except ValueError:
              print(
                  "Invalid input: {} should be a number. Please enter an integer".format(
                      key
                  )
              )
  
imports: from typing import Optional
label_desc: Use image node_id 2 for calling a global function with example usage: input_int(key, description, required, default, new_line) and returns: value