@staticmethod
def get_bbox_edge_pos(bbox, loc):
    """
        Helper function to obtain the location of a corner of a bbox

        Parameters
        ----------
        bbox : `matplotlib.transforms.Bbox`

        loc : {1, 2, 3, 4}
            Corner of *bbox*. Valid values are::

                'upper right'  : 1,
                'upper left'   : 2,
                'lower left'   : 3,
                'lower right'  : 4

        Returns
        -------
        x, y : float
            Coordinates of the corner specified by *loc*.
        """
    x0, y0, x1, y1 = bbox.extents
    if loc == 1:
        return x1, y1
    elif loc == 2:
        return x0, y1
    elif loc == 3:
        return x0, y0
    elif loc == 4:
        return x1, y0
