code: def resize_image():
      global resizedImgBtn
      global rotateImgBtn
      global image_resized
      global image_size
  
      # reset the error label's text
      if lblError["text"] == "Error":
          lblError["text"] = ""
  
      tempSize = selectedSize.get()
  
      if "x" in tempSize:
          try:
              findex = tempSize.index("x")
              lindex = tempSize.rindex("x")
  
              if findex == lindex:
                  image_size = tempSize.replace(" ", "").split("x")
  
                  # test if all values can be represented with an integer
                  int(image_size[0])
                  int(image_size[1])
  
                  if resizedImgBtn["bg"] == "lightgrey":
                      resizedImgBtn["bg"] = "lightblue"
                      rotateImgBtn["bg"] = "lightgrey"
  
                  image_resized = True
  
                  adjust_ghsps()
              else:
                  lblError["text"] = "Error"
                  print("Invalid size specified!")
          except Exception as e:
              lblError["text"] = "Error"
              print(str(e))
      else:
          lblError["text"] = "Error"
          print("Invalid size specified!")
  
imports: import matplotlib.pyplot
  from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
  from matplotlib.figure import Figure
  from tkinter import *
  from tkinter import filedialog
  import platform
  import math
  import caer
label_desc: Use image node_id 3 for calling a global function with example usage: resize_image() without return types