def METHOD_NAME():
    # Tests that two TextureStages with same sort retain insertion order.
    tattr1 = core.TextureAttrib.make()
    tattr1 = tattr1.add_on_stage(stage1, tex1)
    tattr1 = tattr1.add_on_stage(stage2, tex2)
    assert tattr1.get_on_stage(0) == stage1
    assert tattr1.get_on_stage(1) == stage2
    tattr2 = core.TextureAttrib.make()
    tattr2 = tattr2.add_on_stage(stage2, tex2)
    tattr2 = tattr2.add_on_stage(stage1, tex1)
    assert tattr2.get_on_stage(0) == stage2
    assert tattr2.get_on_stage(1) == stage1
    assert tattr1.compare_to(tattr2) == -tattr2.compare_to(tattr1)