code: def _wikiann_to_text_data(wikiann):
      ner_to_iob_dict = {
          0: "O",
          1: "B-PER",
          2: "I-PER",
          3: "B-ORG",
          4: "I-ORG",
          5: "B-LOC",
          6: "I-LOC",
      }
      return TextData(
          tokenized_text=_tokenize_raw_text(
              [" ".join(l) for l in wikiann["tokens"]]
          ),
          label=[
              [ner_to_iob_dict[tag] for tag in tags_list]
              for tags_list in wikiann["ner_tags"]
          ],
          task_type="token_classification",
      )
  
imports: import random
  import typing
  import numpy
  import pytest
  from datasets import load_dataset
  from nltk import download
  from nltk.corpus import movie_reviews
  from deepchecks.nlp.datasets.classification import just_dance_comment_analysis, tweet_emotion
  from deepchecks.nlp.text_data import TextData
label_desc: Use image node_id 22 for calling a global function with example usage: _wikiann_to_text_data(wikiann) and returns: TextData