def display_arr(screen, arr, video_size, transpose):
<EOL>if transpose:<EOL><INDENT>pyg_img = pygame.surfarray.make_surface(arr.swapaxes(<NUM_LIT:0>, <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>pyg_img = arr<EOL><DEDENT>pyg_img = pygame.transform.scale(pyg_img, video_size)<EOL>screen.blit(pyg_img, (<NUM_LIT:0>, <NUM_LIT:0>))<EOL>
Display an image to the pygame screen.

Args:
    screen (pygame.Surface): the pygame surface to write frames to
    arr (np.ndarray): numpy array representing a single frame of gameplay
    video_size (tuple): the size to render the frame as
    transpose (bool): whether to transpose the frame before displaying

Returns:
    None