code: def test_safe_object_compare(self):
      heterogeneous_lists = [
          [0, "foo"],
          [0.0, "foo"],
          [("foo",), "foo"],
      ]
      for L in heterogeneous_lists:
          self.assertRaises(TypeError, L.sort)
          self.assertRaises(TypeError, [(x,) for x in L].sort)
          self.assertRaises(TypeError, [((x,),) for x in L].sort)
  
      float_int_lists = [
          [1, 1.1],
          [1 << 70, 1.1],
          [1.1, 1],
          [1.1, 1 << 70],
      ]
      for L in float_int_lists:
          check_against_PyObject_RichCompareBool(self, L)
  
imports: from test import support
  import random
  import unittest
  from functools import cmp_to_key
label_desc: Use image node_id 1 for calling the TestOptimizedCompares obj's underlying member method code with example usage: obj.test_safe_object_compare() without return types