code: def basic_to_bio(tags):
      """
      Convert a basic tag sequence into a BIO sequence.
      You can compose this with bio2_to_bioes to convert to bioes
  
      Args:
          tags: a list of tags in basic (no B-, I-, etc) format
  
      Returns:
          new_tags: a list of tags in BIO format
      """
      new_tags = []
      for i, tag in enumerate(tags):
          if tag in EMPTY_OR_O_TAG:
              new_tags.append(tag)
          elif i == 0 or tags[i - 1] == "O" or tags[i - 1] != tag:
              new_tags.append("B-" + tag)
          else:
              new_tags.append("I-" + tag)
      return new_tags
  
file_path: stanza/stanza/models/ner/utils.py
imports: import logging
  from stanza.models.common.vocab import EMPTY
label_desc: Use image node_id 4 for calling a global function with example usage: basic_to_bio(tags) and returns: new_tags