code: def output_entities(
      brat_output_folder,
      previous_filename,
      entities,
      text_filepath,
      text,
      overwrite=False,
  ):
      if previous_filename == "":
          return
      output_filepath = os.path.join(
          brat_output_folder, "{0}.ann".format(previous_filename)
      )
      if not overwrite:
          # Avoid overriding existing annotation
          if (
              os.path.exists(output_filepath)
              and os.path.getsize(output_filepath) > 0
          ):
              raise AssertionError(
                  "The annotation already exists at: {0}".format(
                      output_filepath
                  )
              )
      # Write the entities to the annotation file
      with codecs.open(output_filepath, "w", "utf-8") as output_file:
          for i, entity in enumerate(entities):
              output_file.write(
                  "T{0}\t{1} {2} {3}\t{4}\n".format(
                      i + 1,
                      entity["label"],
                      entity["start"],
                      entity["end"],
                      utils_nlp.replace_unicode_whitespaces_with_ascii_whitespace(
                          text[entity["start"] : entity["end"]]
                      ),
                  )
              )
      # Copy the corresponding text file
      if text_filepath != os.path.join(
          brat_output_folder, os.path.basename(text_filepath)
      ):
          shutil.copy(text_filepath, brat_output_folder)
  
file_path: NeuroNER/neuroner/conll_to_brat.py
imports: import codecs
  import glob
  import os
  import shutil
  from neuroner import utils
  from neuroner import utils_nlp
label_desc: Use image node_id 3 for calling a global function with example usage: output_entities(brat_output_folder, previous_filename, entities, text_filepath, text, overwrite) without return types