':param mode: One of the variant modes, as specified by the user
:param matrix: The form select/radio matrix
:return: Yield the paths to be used to generate the variants'

def _get_sample_paths(self, mode, matrix):

    if (mode in [MODE_T, MODE_TB]):
        (yield ([0] * len(matrix)))
    if (mode in [MODE_B, MODE_TB]):
        (yield ([(-1)] * len(matrix)))
    elif (mode in [MODE_TMB, MODE_ALL]):
        variants_total = self._get_variants_count(matrix, mode)
        if (variants_total > self.TOP_VARIANTS):
            msg = 'w3af    found    an    HTML    form    that    has    severalcheckbox,    radio    and    select    input    tags    inside.    Testing    all    combinations    of    those    values    would    take    too    much    time,    the    framework    will    only    test    %s    randomly    distributed    variants.'
            om.out.debug((msg % self.TOP_VARIANTS))
            rand = random.Random()
            rand.seed(self.SEED)
            variants_total = min(variants_total, self.MAX_VARIANTS_TOTAL)
            for path in rand.sample(range(variants_total), self.TOP_VARIANTS):
                (yield self._decode_path(path, matrix))
        else:
            if (mode == MODE_TMB):
                for (row, vector) in enumerate(matrix):
                    if (len(vector) > 3):
                        new_vector = [vector[0], vector[(len(vector) / 2)], vector[(-1)]]
                        matrix[row] = new_vector
                variants_total = self._get_variants_count(matrix, mode)
            for path in xrange(variants_total):
                decoded_path = self._decode_path(path, matrix)
                (yield decoded_path)
