docs: def get_text_position_in_ax_coord(ax, pos, scale=default_text_relative_padding):
      """Return text position corresponding to given 'pos'.
      The text alignment in the bounding box should be set accordingly 
      in order to have a good-looking layout.
      This corresponding text alignment can be obtained by 'get_text_alignment'
      or 'get_text_position_and_inner_alignment' function.
      """
      ratio = get_axes_ratio(ax)
      x, y = scale ,scale
      if ratio > 1: # vertical is longer
          y /= ratio
      elif 0 < ratio: # 0 < ratio <= 1
          x *= ratio
      pos = pos.lower()
      if pos == 'nw': y = 1 - y
      elif pos == 'ne': x, y = 1 - x, 1 - y
      elif pos == 'sw': pass
      elif pos == 'se': x = 1 - x
      else: raise ValueError("Unknown value for 'pos': %s" % (str(pos)))
          
      return x, y