code: def end_current_entity(
      previous_label_without_bio, current_entity_length, new_labels, i
  ):
      """
      Helper function for bio_to_bioes
      """
      if current_entity_length == 0:
          return
      if current_entity_length == 1:
          new_labels[i - 1] = "S-" + previous_label_without_bio
      else:  # elif current_entity_length > 1
          new_labels[i - 1] = "E-" + previous_label_without_bio
  
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 7 for calling a global function with example usage: end_current_entity(previous_label_without_bio, current_entity_length, new_labels, i) without return types