def save_mapping(self, map_file):
    with open(map_file, 'wb') as f:
        pickle.dump(self.node2id, f)
def save_mapping(self, map_file):
    with open(map_file, 'wb') as f:
        pickle.dump(self.node2id, f)