code: def bio_to_bioes(labels):
      previous_label_without_bio = "O"
      current_entity_length = 0
      new_labels = labels.copy()
      for i, label in enumerate(labels):
          label_without_bio = remove_bio_from_label_name(label)
          # end the entity
          if current_entity_length > 0 and (
              label[:2] in ["B-", "O"]
              or label[:2] == "I-"
              and previous_label_without_bio != label_without_bio
          ):
              end_current_entity(
                  previous_label_without_bio,
                  current_entity_length,
                  new_labels,
                  i,
              )
              current_entity_length = 0
          if label[:2] == "B-":
              current_entity_length = 1
          elif label[:2] == "I-":
              if current_entity_length == 0:
                  new_labels[i] = "B-" + label_without_bio
              current_entity_length += 1
          previous_label_without_bio = label_without_bio
      end_current_entity(
          previous_label_without_bio,
          current_entity_length,
          new_labels,
          i + 1,
      )
      return new_labels
  
file_path: NeuroNER/neuroner/utils_nlp.py
imports: import codecs
  import os
  import re
  import numpy
  from neuroner import utils
label_desc: Use image node_id 8 for calling a global function with example usage: bio_to_bioes(labels) and returns: new_labels