'Produce a JSON with a valid API response syntax for operation, but
with type information. Each node represented by a key has the
value containing field type, e.g.,
output_spec["SomeBooleanNode"] => {"type": "boolean"}'

def output_spec(self, operation):

    try:
        op = self.operations[operation]
    except KeyError:
        raise ValueError(u'Invalid    operation:    {}'.format(operation))
    if (u'output' not in op):
        return {}
    shape = self.shapes[op[u'output'][u'shape']]
    return self._expand(shape)
