docs: def reorient(image, orientation):
      """Return reoriented view of image array.
  
      Parameters
      ----------
      image : numpy.ndarray
          Non-squeezed output of asarray() functions.
          Axes -3 and -2 must be image length and width respectively.
      orientation : int or str
          One of TIFF.ORIENTATION names or values.
  
      """
      orient = TIFF.ORIENTATION
      orientation = enumarg(orient, orientation)
  
      if orientation == orient.TOPLEFT:
          return image
      if orientation == orient.TOPRIGHT:
          return image[..., ::-1, :]
      if orientation == orient.BOTLEFT:
          return image[..., ::-1, :, :]
      if orientation == orient.BOTRIGHT:
          return image[..., ::-1, ::-1, :]
      if orientation == orient.LEFTTOP:
          return numpy.swapaxes(image, -3, -2)
      if orientation == orient.RIGHTTOP:
          return numpy.swapaxes(image, -3, -2)[..., ::-1, :]
      if orientation == orient.RIGHTBOT:
          return numpy.swapaxes(image, -3, -2)[..., ::-1, :, :]
      if orientation == orient.LEFTBOT:
          return numpy.swapaxes(image, -3, -2)[..., ::-1, ::-1, :]
      return image