def _generatePermEncoderStr(options, encoderDict):
permStr = "<STR_LIT>"<EOL>if encoderDict.get('<STR_LIT>', False):<EOL><INDENT>permStr = "<STR_LIT>"<EOL>for key, value in list(encoderDict.items()):<EOL><INDENT>if key == "<STR_LIT:name>":<EOL><INDENT>continue<EOL><DEDENT>if key == '<STR_LIT:n>' and encoderDict['<STR_LIT:type>'] != '<STR_LIT>':<EOL><INDENT>permStr += "<STR_LIT>" % (encoderDict["<STR_LIT:w>"] + <NUM_LIT:7>,<EOL>encoderDict["<STR_LIT:w>"] + <NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>if issubclass(type(value), str):<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT>else:<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT><DEDENT><DEDENT>permStr += "<STR_LIT:)>"<EOL><DEDENT>else:<EOL><INDENT>if encoderDict["<STR_LIT:type>"] in ["<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>permStr = "<STR_LIT>"<EOL>for key, value in list(encoderDict.items()):<EOL><INDENT>if key == "<STR_LIT>":<EOL><INDENT>key = "<STR_LIT>"<EOL><DEDENT>elif key == "<STR_LIT:type>":<EOL><INDENT>key = "<STR_LIT>"<EOL><DEDENT>elif key == "<STR_LIT:name>":<EOL><INDENT>continue<EOL><DEDENT>if key == "<STR_LIT:n>":<EOL><INDENT>permStr += "<STR_LIT>" % (encoderDict["<STR_LIT:w>"] + <NUM_LIT:1>,<EOL>encoderDict["<STR_LIT:w>"] + <NUM_LIT>)<EOL><DEDENT>elif key == "<STR_LIT>":<EOL><INDENT>if value and not "<STR_LIT>" in encoderDict:<EOL><INDENT>permStr += "<STR_LIT>"% (_quoteAndEscape("<STR_LIT>"), _quoteAndEscape("<STR_LIT>"))<EOL><DEDENT>encoderDict.pop("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>if issubclass(type(value), str):<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT>else:<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT><DEDENT><DEDENT>permStr += "<STR_LIT:)>"<EOL><DEDENT>elif encoderDict["<STR_LIT:type>"] in ["<STR_LIT>"]:<EOL><INDENT>permStr = "<STR_LIT>"<EOL>for key, value in list(encoderDict.items()):<EOL><INDENT>if key == "<STR_LIT>":<EOL><INDENT>key = "<STR_LIT>"<EOL><DEDENT>elif key == "<STR_LIT:type>":<EOL><INDENT>key = "<STR_LIT>"<EOL><DEDENT>elif key == "<STR_LIT:name>":<EOL><INDENT>continue<EOL><DEDENT>if issubclass(type(value), str):<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT>else:<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT><DEDENT>permStr += "<STR_LIT:)>"<EOL><DEDENT>elif encoderDict["<STR_LIT:type>"] in ["<STR_LIT>"]:<EOL><INDENT>permStr = "<STR_LIT>"<EOL>for key, value in list(encoderDict.items()):<EOL><INDENT>if key == "<STR_LIT>":<EOL><INDENT>key = "<STR_LIT>"<EOL><DEDENT>elif key == "<STR_LIT:type>":<EOL><INDENT>continue<EOL><DEDENT>elif key == "<STR_LIT:name>":<EOL><INDENT>continue<EOL><DEDENT>if key == "<STR_LIT>":<EOL><INDENT>permStr += "<STR_LIT>" % (encoderDict["<STR_LIT:type>"])<EOL>permStr += "<STR_LIT>"<EOL>permStr += "<STR_LIT>" % (value[<NUM_LIT:0>])<EOL><DEDENT>elif key == "<STR_LIT>":<EOL><INDENT>permStr += "<STR_LIT>" % (encoderDict["<STR_LIT:type>"])<EOL>permStr += "<STR_LIT>"<EOL>permStr += "<STR_LIT>" % (value[<NUM_LIT:0>])<EOL><DEDENT>elif key == "<STR_LIT>":<EOL><INDENT>permStr += "<STR_LIT>" % (encoderDict["<STR_LIT:type>"])<EOL>permStr += "<STR_LIT>"<EOL>permStr += "<STR_LIT>" % (value)<EOL><DEDENT>else:<EOL><INDENT>if issubclass(type(value), str):<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT>else:<EOL><INDENT>permStr += "<STR_LIT>" % (key, value)<EOL><DEDENT><DEDENT><DEDENT>permStr += "<STR_LIT:)>"<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>" %(encoderDict["<STR_LIT:type>"]))<EOL><DEDENT><DEDENT>return permStr<EOL>
Generate the string that defines the permutations to apply for a given
    encoder.

    Parameters:
    -----------------------------------------------------------------------
    options: experiment params
    encoderDict: the encoder dict, which gets placed into the description.py


    For example, if the encoderDict contains:
        'consumption':     {
                  'clipInput': True,
                  'fieldname': u'consumption',
                  'n': 100,
                  'name': u'consumption',
                  'type': 'AdaptiveScalarEncoder',
                  'w': 21},

    The return string will contain:
      "PermuteEncoder(fieldName='consumption',
                      encoderClass='AdaptiveScalarEncoder',
                      w=21,
                      n=PermuteInt(28, 521),
                      clipInput=True)"