'add a new attribute declaration to the graph'

def declareAttribute(self, attClass, type, defaultValue, title='', mode='static', id=None):

    if (attClass in self.attClass_choices):
        if (not id):
            id = str(len(self[attClass]))
        self[attClass][id] = {'id': id, 'type': type, 'defaultValue': defaultValue, 'mode': mode, 'title': title}
        return id
    else:
        raise Exception(((('wrong    attClass    :    ' + str(attClass)) + '    Should    be    in    ') + str(type_choices)))
