def METHOD_NAME(
    markers: list,
    color: Color,
    p: QtGui.QPainter,
    left: float,
    right: float,
    right_offset: float,
) -> float:
    '''
    Paint markers in ``pg.GraphicsItem`` style by first
    removing the view transform for the painter, drawing the markers
    in scene coords, then restoring the view coords.
    '''
    # paint markers in native coordinate system
    orig_tr = p.transform()
    start = orig_tr.map(Point(left, 0))
    end = orig_tr.map(Point(right, 0))
    up = orig_tr.map(Point(left, 1))
    dif = end - start
    # length = Point(dif).length()
    angle = np.arctan2(dif.y(), dif.x()) * 180 / np.pi
    p.resetTransform()
    p.translate(start)
    p.rotate(angle)
    up = up - start
    det = up.x() * dif.y() - dif.x() * up.y()
    p.scale(1, 1 if det > 0 else -1)
    p.setBrush(fn.mkBrush(color))
    # p.setBrush(fn.mkBrush(self.currentPen.color()))
    tr = p.transform()
    sizes = []
    for path, pos, size in markers:
        p.setTransform(tr)
        # XXX: we drop the "scale / %" placement
        # x = length * pos
        x = right_offset
        p.translate(x, 0)
        p.scale(size, size)
        p.drawPath(path)
        sizes.append(size)
    p.setTransform(orig_tr)
    return max(sizes)