docs: def reorient(image, orientation):
      """Return reoriented view of image array.
  
      Parameters
      ----------
      image : numpy array
          Non-squeezed output of asarray() functions.
          Axes -3 and -2 must be image length and width respectively.
      orientation : int or str
          One of TIFF_ORIENTATIONS keys or values.
  
      """
      o = TIFF_ORIENTATIONS.get(orientation, orientation)
      if o == 'top_left':
          return image
      elif o == 'top_right':
          return image[..., ::-1, :]
      elif o == 'bottom_left':
          return image[..., ::-1, :, :]
      elif o == 'bottom_right':
          return image[..., ::-1, ::-1, :]
      elif o == 'left_top':
          return numpy.swapaxes(image, -3, -2)
      elif o == 'right_top':
          return numpy.swapaxes(image, -3, -2)[..., ::-1, :]
      elif o == 'left_bottom':
          return numpy.swapaxes(image, -3, -2)[..., ::-1, :, :]
      elif o == 'right_bottom':
          return numpy.swapaxes(image, -3, -2)[..., ::-1, ::-1, :]