'Generate all FormParams\' variants by mode:
\'all\' - all values
\'tb\'  - only top and bottom values
\'tmb\' - top, middle and bottom values
\'t\'   - top values
\'b\'   - bottom values'

def get_variants(self, mode=MODE_TMB):

    if (mode not in (MODE_ALL, MODE_TB, MODE_TMB, MODE_T, MODE_B)):
        raise ValueError(('Invalid    variants    mode:    "%s"' % mode))
    (yield self)
    option_names = self.get_option_names()
    if (not option_names):
        return
    matrix = self.get_option_matrix()
    for sample_path in self._get_sample_paths(mode, matrix):
        self_variant = self.deepish_copy()
        for (option_name_index, option_value_index) in enumerate(sample_path):
            option_name = option_names[option_name_index]
            try:
                value = matrix[option_name_index][option_value_index]
            except IndexError:
                '\n                                                                                This    handles    "select"    tags    that    have    no    options    inside.\n\n                                                                                The    get_variants    method    should    return    a    variant    with    the\n                                                                                select    tag    name    that    is    always    an    empty    string.\n\n                                                                                This    case    reported    by    Taras    at\n                                                                                https://sourceforge.net/apps/trac/w3af/ticket/171015\n                                                                                '
                value = ''
            self_variant[option_name] = [value]
        (yield self_variant)
