human
I wrote the below code

    class OldStyle:
        def __getitem__(self, index):
            return index
    class OldStyleWithLen:
        def __getitem__(self, index):
            return index
        def __len__(self):
            return 10
    class NewStyle(object, ):
        def __getitem__(self, index):
            return index
    class OldStyleWithLenAndGetSlice:
        def __getitem__(self, index):
            return index
        def __len__(self):
            return 10
        def __getslice__(self, start, stop):
            return (start, stop)
    AreEqual(NewStyle()[slice(None, (-1), None)], slice(None, (-1), None))
    AreEqual(OldStyleWithLen()[slice(None, (-1), None)], slice(None, (-1), None))
    AreEqual(OldStyle()[slice(None, (-1), None)], slice(None, (-1), None))
    AreEqual(OldStyleWithLenAndGetSlice()[slice(None, (-1), None)], slice(None, (-1), None))
    AreEqual(NewStyle()[:(-1)], slice(None, (-1), None))
    AreEqual(OldStyleWithLen()[:(-1)], slice(0, 9, None))
    AreEqual(OldStyleWithLenAndGetSlice()[:(-1)], (0, 9))
    AreEqual(OldStyle()[:(-1):1], slice(None, (-1), 1))
    try:
        (OldStyle()[:(-1)],)
        AssertUnreachable()
    except AttributeError:
        pass
    try:
        (OldStyle()[(-1):],)
        AssertUnreachable()
    except AttributeError:
        pass
    for (x, y) in [((-1), (-1)), ((-2), 0), (0, (-2)), ((-2), (-2))]:
        try:
            (OldStyle()[x:y],)
            AssertUnreachable()
        except AttributeError:
            pass
    AreEqual(OldStyle()[:(-1):None], slice(None, (-1), None))
    AreEqual(OldStyle()[(-1)::None], slice((-1), None, None))
    AreEqual(OldStyle()[:(-1):None], slice(None, (-1), None))
    AreEqual(OldStyle()[(-1)::None], slice((-1), None, None))

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def test_oldclass_and_direct():