def get_transform(self, flip_x=False, flip_y=False, rotate=0):
        transform = self.get_region(0, 0, self.width, self.height)
        bl, br, tr, tl = 0, 1, 2, 3 
        transform.anchor_x = self.anchor_x
        transform.anchor_y = self.anchor_y
        if flip_x:
            bl, br, tl, tr = br, bl, tr, tl
            transform.anchor_x = self.width - self.anchor_x
        if flip_y:
            bl, br, tl, tr = tl, tr, bl, br
            transform.anchor_y = self.height - self.anchor_y
        rotate %= 360
        if rotate < 0:
            rotate += 360
        if rotate == 0:
            pass
        elif rotate == 90:
            bl, br, tr, tl = br, tr, tl, bl
            transform.anchor_x, transform.anchor_y = \
                transform.anchor_y, \
                transform.width - transform.anchor_x
        elif rotate == 180:
            bl, br, tr, tl = tr, tl, bl, br
            transform.anchor_x = transform.width - transform.anchor_x
            transform.anchor_y = transform.height - transform.anchor_y
        elif rotate == 270:
            bl, br, tr, tl = tl, bl, br, tr
            transform.anchor_x, transform.anchor_y = \
                transform.height - transform.anchor_y, \
                transform.anchor_x
        else:
            assert False, 'Only 90 degree rotations are supported.'
        if rotate in (90, 270):
            transform.width, transform.height = \
                transform.height, transform.width
        transform._set_tex_coords_order(bl, br, tr, tl)
        return transform
verify that a simple long running program can be displayed correctly
dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/Texture.get_transform--crossover with--dataset/ETHPy150Open jut-io/jut-python-tools/tests/jut_jobs_tests.py/JutJobsTests.test_jut_jobs_with_running_jobs