code: def write_temp_2tag(filename, bio_data):
      doc = []
      sentences = bio_data.split("\n\n")
      for sentence in sentences:
          doc.append([])
          for word in sentence.split("\n"):
              text, tags = word.split("\t", maxsplit=1)
              doc[-1].append({"text": text, "multi_ner": tags.split()})
  
      with open(filename, "w", encoding="utf-8") as fout:
          json.dump(doc, fout)
  
imports: import json
  import logging
  import os
  import warnings
  import pytest
  import torch
  from stanza.models import ner_tagger
  from stanza.models.ner.trainer import Trainer
  from stanza.tests import TEST_WORKING_DIR
  from stanza.utils.datasets.ner.prepare_ner_file import process_dataset
label_desc: Use image node_id 3 for calling a global function with example usage: write_temp_2tag(filename, bio_data) without return types