'Place the *bbox* inside the *parentbbox* according to a given
location code. Return the (x,y) coordinate of the bbox.
- loc: a location code in range(1, 11).
This corresponds to the possible values for self._loc, excluding
"best".
- bbox: bbox to be placed, display coodinate units.
- parentbbox: a parent box which will contain the bbox. In
display coordinates.'

def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):

    assert (loc in range(1, 11))
    (BEST, UR, UL, LL, LR, R, CL, CR, LC, UC, C) = list(xrange(11))
    anchor_coefs = {UR: u'NE', UL: u'NW', LL: u'SW', LR: u'SE', R: u'E', CL: u'W', CR: u'E', LC: u'S', UC: u'N', C: u'C'}
    c = anchor_coefs[loc]
    fontsize = renderer.points_to_pixels(self._fontsize)
    container = parentbbox.padded(((- self.borderaxespad) * fontsize))
    anchored_box = bbox.anchored(c, container=container)
    return (anchored_box.x0, anchored_box.y0)
