def METHOD_NAME(self):
    class C:
        def __class_getitem__(cls, item):
            return f'{cls.__name__}[{item.__name__}]'
    class D(C): ...
    self.assertEqual(D[int], 'D[int]')
    self.assertEqual(D[D], 'D[D]')