code: def _border(border):
      if isinstance(border, tuple):
          if len(border) == 2:
              left, top = right, bottom = border
          elif len(border) == 4:
              left, top, right, bottom = border
      else:
          left = top = right = bottom = border
      return left, top, right, bottom
  
imports: import functools
  import operator
  import re
  from .None import ExifTags, Image, ImagePalette
label_desc: Use image node_id 1 for calling a global function with example usage: _border(border) and returns: left,  top,  right,  bottom