def draw_line(self, p1, p2, color=None):
        r, g, b = self.colors[(NUM) % self.n_colors]
        self.ctx.set_source_rgba(r, g, b, .5)
        steps = int(max([abs(p2[0] - p1[0]), abs(p2[1] - p1[1])]) / ONE)
        step1 = (max(p1[0], p2[0])-min(p1[0], p2[0]))/steps
        step1 = -step1 if p1[0] >= p2[0] else step1
        step2 = (max(p1[1], p2[1])-min(p1[1], p2[1]))/steps
        step2 = -step2 if p1[1] >= p2[1] else step2
        # colors = polylinear_gradient(['#0000ff','#ff0000'], steps+1)
        if color:
            #color = Color('black')
            colors = list(Color('black').range_to(Color('red'), steps+1))
            alpha = 1
        else:
            colors = list(Color('blue').range_to(Color('red'), steps+1))
            alpha = .2
        step = 0
        for x, y in zip(np.arange(p1[0], p2[0], step1), np.arange(p1[1], p2[1], step2)):
            self.ctx.set_source_rgba(*(colors[step].rgb + (alpha,)))
            # self.ctx.set_source_rgba(
            #    colors['r'][step], colors['g'][step], colors['b'][step], 1)
            step += 1
            self.ctx.rectangle(x, y, ONE, ONE)
            self.ctx.fill()
:type aws_access_key_id: string
dataset/ETHPy150Open dnlcrl/PyGraphArt/src/render.py/Render.draw_line--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/boto-2.38.0/boto/__init__.py/connect_autoscale