class_docstr: Helper function for key functions when sorting unorderable objects.
  
  The wrapped-object will fallback to a Py2.x style comparison for
  unorderable types (sorting first comparing the type name and then by
  the obj ids).  Does not work recursively, so dict.items() must have
  _safe_key applied to both the key and the value.
class_docstr_tok: ["Helper","function","for","key","functions","when","sorting","unorderable","objects",".","The","wrapped-object","will","fallback","to","a","Py2.x","style","comparison","for","unorderable","types","(","sorting","first","comparing","the","type","name","and","then","by","the","obj","ids",")",".","Does","not","work","recursively",",","so","dict.items","(",")","must","have","_safe_key","applied","to","both","the","key","and","the","value","."]
code: def __lt__(self, other):
      try:
          return self.obj < other.obj
      except TypeError:
          return (str(type(self.obj)), id(self.obj)) < (
              str(type(other.obj)),
              id(other.obj),
          )
  
imports: import collections
  import dataclasses
  import re
  import sys
  import types
  from io import StringIO
label_desc: Use image node_id 2 for calling the _safe_key obj's underlying member method code with example usage: obj.__lt__(other) and returns: unknown, unknown