code: def _tilesort(t):
      # sort on offset
      return t[2]
  
imports: from __future__ import annotations
  import io
  import itertools
  import struct
  import sys
  from typing import Any, NamedTuple
  from .None import Image
  from ._deprecate import deprecate
  from ._util import is_path
label_desc: Use image node_id 3 for calling a global function with example usage: _tilesort(t) and returns: t