code: def setup_size(size: Any, error_msg="Need a tuple of length 2"):
      if size is None:
          raise ValueError("Size can't be None")
  
      if isinstance(size, int):
          return size, size
      elif isinstance(size, (list, tuple)) and len(size) == 1:
          return size[0], size[0]
  
      if len(size) != 2:
          raise ValueError(error_msg)
  
      return size
  
imports: from typing import Any
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: setup_size(size, error_msg) and returns: size, size,  size, size,  size