docs: def _calc_position_for_pin(self, x, y, relative_position):
          """Determine position at fraction of x, y path.
  
          :param x,y: two equal length lists of values describing a path.
          :param relative_position: value between 0 and 1
          :returns: the x, y position of the fraction (relative_position)
                    of the path length.
  
          """
          try:
              max_idx_x = len(x) - 1
              max_idx_y = len(y) - 1
          except TypeError:
              return x, y
          else:
              assert max_idx_x == max_idx_y, \
                  'If x and y are iterables, they must be the same length'
  
          if relative_position == 0:
              xs, ys = x[0], y[0]
          elif relative_position == 1:
              xs, ys = x[max_idx_x], y[max_idx_y]
          else:
              if self.xmode == 'log':
                  x = np.log10(np.array(x))
              if self.ymode == 'log':
                  y = np.log10(np.array(y))
              rel_length = [0]
              rel_length.extend(self._calc_relative_path_lengths(x, y))
              idx = np.interp(relative_position, rel_length,
                              range(len(rel_length)))
              frac, idx = modf(idx)
              idx = int(idx)
              if self.xmode == 'log':
                  xs = 10 ** (x[idx] + (x[idx + 1] - x[idx]) * frac)
              else:
                  xs = x[idx] + (x[idx + 1] - x[idx]) * frac
              if self.ymode == 'log':
                  ys = 10 ** (y[idx] + (y[idx + 1] - y[idx]) * frac)
              else:
                  ys = y[idx] + (y[idx + 1] - y[idx]) * frac
          return xs, ys