<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_token_to_document(self, token_string, token_attrs=None):
 """add a token node to this document graph"""

        token_feat = {self.ns+':token': token_string}
        if token_attrs:
            token_attrs.update(token_feat)
        else:
            token_attrs = token_feat
        token_id = 'token_{}'.format(self.token_count)
        self.add_node(token_id, layers={self.ns, self.ns+':token'},
                      attr_dict=token_attrs)
        self.token_count += 1
        self.tokens.append(token_id)
        return token_id