def _getAdditionalSpecs(poolerClass=_getDefaultPoolerClass(), poolerType="union"):
  """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 pooler parameters based on the selected implementation.
  """
  typeNames = {int: "UInt32", float: "Real32", str: "Byte", bool: "bool",
               tuple: "tuple"}

  def getArgType(arg):
    t = typeNames.get(type(arg), "Byte")
    count = 0 if t == "Byte" else 1
    if t == "tuple":
      t = typeNames.get(type(arg[0]), "Byte")
      count = len(arg)
    if t == "bool":
      t = "UInt32"
    return (t, count)

  def getConstraints(arg):
    t = typeNames.get(type(arg), "Byte")
    if t == "Byte":
      return "multiple"
    elif t == "bool":
      return "bool"
    else:
      return ""

  # Get arguments from pooler constructors, figure out types of
  # variables and populate poolerSpec.
  pArgTuples = _buildArgs(poolerClass)
  poolerSpec = {}
  for argTuple in pArgTuples:
    d = dict(
      description=argTuple[1],
      accessMode="ReadWrite",
      dataType=getArgType(argTuple[2])[0],
      count=getArgType(argTuple[2])[1],
      constraints=getConstraints(argTuple[2]))
    poolerSpec[argTuple[0]] = d

  # Get arguments from spatial pooler constructors, figure out types of
  # variables and populate poolerSpec.
  # This allows setting SP parameters
  pArgTuples = _buildArgs(_getParentSpatialPoolerClass(poolerType))
  for argTuple in pArgTuples:
    d = dict(
      description=argTuple[1],
      accessMode="ReadWrite",
      dataType=getArgType(argTuple[2])[0],
      count=getArgType(argTuple[2])[1],
      constraints=getConstraints(argTuple[2]))
    poolerSpec[argTuple[0]] = d

  # Add special parameters that weren't handled automatically
  # Pooler parameters only
  poolerSpec.update(dict(
    columnCount=dict(
      description="Total number of columns (coincidences).",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints=""),

    inputWidth=dict(
      description="Size of inputs to the UP.",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints=""),

    historyLength=dict(
      description="The union window length",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints=""),

    minHistory=dict(
      description="don't perform union (output all zeros) until buffer"
                  " length >= minHistory",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints=""),

     poolerType=dict(
      description="Type of pooler to use: union",
      accessMode="ReadWrite",
      dataType="Byte",
      count=0,
      constraints="enum: union"),
     ))


  # The last group is for parameters that aren't specific to pooler
  otherSpec = dict(
    learningMode=dict(
      description="1 if the node is learning (default 1).",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints="bool"),

    inferenceMode=dict(
      description="1 if the node outputs current inference (default 1).",
      accessMode="ReadWrite",
      dataType="UInt32",
      count=1,
      constraints="bool"),



  )

  return poolerSpec, otherSpec
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 pooler parameters based on the selected implementation.