def drawLabel(plot_image, pt, label, size='small',align='center',rotate=False,color='black'):
    font = small_font
    if size == 'large':
        font = large_font
    elif size == "huge":
        font = huge_font
        
    # Render the mask
    size = font.getsize(label)
    im = PIL.Image.new("L",size,'black')
    draw = PIL.ImageDraw.Draw(im)
    draw.text((0,0),label,fill='white',font=font)
    del draw
    
    # Rotate
    if rotate:
        im = im.transpose(PIL.Image.ROTATE_90)
    
    # Render the text
    x,y = pt
    w,h = im.size
    if align == 'center':
        x = x - w/2
        y = y - h/2 
    elif align == 'left':
        x = x - w
        y = y - h/2 
    elif align == 'right':
        x = x
        y = y - h/2 
    elif align == 'above':
        x = x - w/2
        y = y - h
    elif align == 'bellow':
        x = x - w/2
        y = y
    else:
        raise ValueError("Unknown alignment: %s"%align)
    draw = PIL.ImageDraw.Draw(plot_image)
    draw.bitmap((x,y),im,fill=color)
    del draw
    #plot_image.(color,(x,y,x+w,y+h),im)
Make an HTTP REPLICATE request
dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/plot.py/drawLabel--crossover with--dataset/ETHPy150Open openstack/swift/swift/common/db_replicator.py/ReplConnection.replicate