code: def _cmp_fn(name, op, self_tuple, other_tuple, globals):
      # Create a comparison function.  If the fields in the object are
      # named 'x' and 'y', then self_tuple is the string
      # '(self.x,self.y)' and other_tuple is the string
      # '(other.x,other.y)'.
  
      return _create_fn(
          name,
          ("self", "other"),
          [
              "if other.__class__ is self.__class__:",
              f" return {self_tuple}{op}{other_tuple}",
              "return NotImplemented",
          ],
          globals=globals,
      )
  
imports: import re
  import sys
  import copy
  import types
  import inspect
  import keyword
  import builtins
  import functools
  import itertools
  import abc
  import _thread
  from types import FunctionType, GenericAlias
label_desc: Use image node_id 12 for calling a global function with example usage: _cmp_fn(name, op, _tuple, other_tuple, globals) and returns: _create_fn