def _getAdditionalSpecs(spatialImp, kwargs={}):
typeNames = {int: '<STR_LIT>', float: '<STR_LIT>', str: '<STR_LIT>', bool: '<STR_LIT:bool>', tuple: '<STR_LIT>'}<EOL>def getArgType(arg):<EOL><INDENT>t = typeNames.get(type(arg), '<STR_LIT>')<EOL>count = <NUM_LIT:0> if t == '<STR_LIT>' else <NUM_LIT:1><EOL>if t == '<STR_LIT>':<EOL><INDENT>t = typeNames.get(type(arg[<NUM_LIT:0>]), '<STR_LIT>')<EOL>count = len(arg)<EOL><DEDENT>if t == '<STR_LIT:bool>':<EOL><INDENT>t = '<STR_LIT>'<EOL><DEDENT>return (t, count)<EOL><DEDENT>def getConstraints(arg):<EOL><INDENT>t = typeNames.get(type(arg), '<STR_LIT>')<EOL>if t == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>elif t == '<STR_LIT:bool>':<EOL><INDENT>return '<STR_LIT:bool>'<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT><DEDENT>SpatialClass = getSPClass(spatialImp)<EOL>sArgTuples = _buildArgs(SpatialClass.__init__)<EOL>spatialSpec = {}<EOL>for argTuple in sArgTuples:<EOL><INDENT>d = dict(<EOL>description=argTuple[<NUM_LIT:1>],<EOL>accessMode='<STR_LIT>',<EOL>dataType=getArgType(argTuple[<NUM_LIT:2>])[<NUM_LIT:0>],<EOL>count=getArgType(argTuple[<NUM_LIT:2>])[<NUM_LIT:1>],<EOL>constraints=getConstraints(argTuple[<NUM_LIT:2>]))<EOL>spatialSpec[argTuple[<NUM_LIT:0>]] = d<EOL><DEDENT>spatialSpec.update(dict(<EOL>columnCount=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT>'),<EOL>inputWidth=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT>'),<EOL>spInputNonZeros=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>spOutputNonZeros=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>spOverlapDistribution=dict(<EOL>description="""<STR_LIT>""",<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>sparseCoincidenceMatrix=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>denseOutput=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>spLearningStatsStr=dict(<EOL>description="""<STR_LIT>""",<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>spatialImp=dict(<EOL>description="""<STR_LIT>""",<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>))<EOL>otherSpec = dict(<EOL>learningMode=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT:bool>'),<EOL>inferenceMode=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT:bool>'),<EOL>anomalyMode=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT:bool>'),<EOL>topDownMode=dict(<EOL>description='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT:bool>'),<EOL>activeOutputCount=dict(<EOL>description='<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:1>,<EOL>constraints='<STR_LIT>'),<EOL>logPathInput=dict(<EOL>description='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>logPathOutput=dict(<EOL>description='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>logPathOutputDense=dict(<EOL>description='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>accessMode='<STR_LIT>',<EOL>dataType='<STR_LIT>',<EOL>count=<NUM_LIT:0>,<EOL>constraints='<STR_LIT>'),<EOL>)<EOL>return spatialSpec, otherSpec<EOL>
Build the additional specs in three groups (for the inspector)

    Use the type of the default argument to set the Spec type, defaulting
    to 'Byte' for None and complex types

    Determines the spatial parameters based on the selected implementation.
    It defaults to SpatialPooler.