code: def add_node(self, name_base, attrs=None):
          
          if name_base not in self.counters:
              node_id = name_base
          else:
              node_id = '%s_%d' % (name_base, self.counters[name_base])
          node = {'id': node_id}
          if attrs:
              node['attrs'] = attrs
          self.nodes.append(node)
          self.counters[node_id] += 1
          return node_id
docs: Add a node with a given base name to the Nugget and return ID.