def buildColourMap(self):

        self.mColours = []

        if self.mAltColours:

            for colidx in range(len(self.mThresholdsColour) + 1):

                col = colidx / (len(self.mThresholdsColour) - 0.0)

                if col == 0.5:
                    x = 0
                    col0 = [0, 0, 0]
                    col1 = [0, 0, 0]
                elif col < 0.5:
                    x = min(1, 1 - 2 * col)
                    col0 = [26, 0, 128]
                    col1 = [255, 0, 0]
                else:
                    x = min(1, 2 * col - 1)
                    col0 = [26, 52, 13]
                    col1 = [230, 255, 52]
                self.mColours.append((col0[0] + x * (col1[0] - col0[0]),
                                      col0[1] + x * (col1[1] - col0[1]),
                                      col0[2] + x * (col1[2] - col0[2])))

        else:

            num_steps = int(
                math.floor((len(self.mThresholdsColour) + 1) / 2.0))

            d = map(lambda x, y: (x - y) / num_steps,
                    self.mMiddleColour, self.startColour)
            for x in range(num_steps):
                self.mColours.append((self.startColour[0] + x * d[0],
                                      self.startColour[1] + x * d[1],
                                      self.startColour[2] + x * d[2]))

            # self.mColours.append( self.mMiddleColour )

            d = map(lambda x, y: (x - y) / num_steps,
                    self.mStopColour, self.mMiddleColour)
            for x in range(1, num_steps):
                self.mColours.append((self.mMiddleColour[0] + x * d[0],
                                      self.mMiddleColour[1] + x * d[1],
                                      self.mMiddleColour[2] + x * d[2]))

            self.mColours.append(self.mStopColour)
Verify that the authorization_code is valid and assigned to the given
dataset/ETHPy150Open CGATOxford/cgat/scripts/go2svg.py/GoPlot.buildColourMap--crossover with--dataset/ETHPy150Open idan/oauthlib/oauthlib/oauth2/rfc6749/request_validator.py/RequestValidator.validate_code