<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_hflip(self, val):
 """val is True or False that determines if we should horizontally flip the surface or not."""

        if self.__horizontal_flip is not val:
            self.__horizontal_flip = val
            self.image = pygame.transform.flip(self.untransformed_image, val, self.__vertical_flip)