code: def test_create_collation_bad_upper(self):
      class BadUpperStr(str):
          def upper(self):
              return None
  
      mycoll = lambda x, y: -((x > y) - (x < y))
      self.con.create_collation(BadUpperStr("mycoll"), mycoll)
      result = self.con.execute(
          """
              select x from (
              select 'a' as x
              union
              select 'b' as x
              ) order by x collate mycoll
              """
      ).fetchall()
      self.assertEqual(result[0][0], "b")
      self.assertEqual(result[1][0], "a")
  
imports: import contextlib
  import sqlite3
  import unittest
  from test.support.os_helper import TESTFN, unlink
  from .util import memory_database, cx_limit, with_tracebacks
  from .util import MemoryDatabaseMixin
label_desc: Use image node_id 4 for calling the CollationTests obj's underlying member method code with example usage: obj.test_create_collation_bad_upper() and returns: None