code: def tuple_offset(offset):
      if isinstance(offset, tuple):
          return offset
      else:
          return tuple(offset)
  
imports: from collections import defaultdict
  from copy import deepcopy
  from typing import Dict, List
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: tuple_offset(offset) and returns: offset, tuple