'Draw nodes recursively with image
thumbnails for leaf nodes.'

def draw(self, draw, x, y, s, imlist, im):

    h1 = int(((self.left.get_height() * 20) / 2))
    h2 = int(((self.right.get_height() * 20) / 2))
    top = (y - (h1 + h2))
    bottom = (y + (h1 + h2))
    draw.line((x, (top + h1), x, (bottom - h2)), fill=(0, 0, 0))
    ll = (self.distance * s)
    draw.line((x, (top + h1), (x + ll), (top + h1)), fill=(0, 0, 0))
    draw.line((x, (bottom - h2), (x + ll), (bottom - h2)), fill=(0, 0, 0))
    self.left.draw(draw, (x + ll), (top + h1), s, imlist, im)
    self.right.draw(draw, (x + ll), (bottom - h2), s, imlist, im)
