code: def load_file(full_name, debug=False):
      """
      load a *._conll file
      Input: full_name: path to the file
      Output: list of tuples for each conll doc in the file, where the tuple contains:
          (utts_text ([str]): list of the utterances in the document
           utts_tokens ([[str]]): list of the tokens (conll words) in the document
           utts_corefs: list of coref objects (dicts) with the following properties:
              coref['label']: id of the coreference cluster,
              coref['start']: start index (index of first token in the utterance),
              coref['end': end index (index of last token in the utterance).
           utts_speakers ([str]): list of the speaker associated to each utterances in the document
           name (str): name of the document
           part (str): part of the document
          )
      """
      docs = []
      with io.open(
          full_name, "rt", encoding="utf-8", errors="strict"
      ) as f:
          lines = list(f)  # .readlines()
          utts_text = []
          utts_tokens = []
          utts_corefs = []
          utts_speakers = []
          tokens = []
          corefs = []
          index = 0
          speaker = ""
          name = ""
          part = ""
          for li, line in enumerate(lines):
              cols = line.split()
              if debug:
                  print("line", li, "cols:", cols)
              # End of utterance
              if len(cols) == 0:
                  if tokens:
                      if debug:
                          print("End of utterance")
                      utts_text.append("".join(t + " " for t in tokens))
                      utts_tokens.append(tokens)
                      utts_speakers.append(speaker)
                      utts_corefs.append(corefs)
                      tokens = []
                      corefs = []
                      index = 0
                      speaker = ""
                      continue
              # End of doc
              elif len(cols) == 2:
                  if debug:
                      print("End of doc")
                  if cols[0] == "#end":
                      if debug:
                          print("Saving doc")
                      docs.append(
                          (
                              utts_text,
                              utts_tokens,
                              utts_corefs,
                              utts_speakers,
                              name,
                              part,
                          )
                      )
                      utts_text = []
                      utts_tokens = []
                      utts_corefs = []
                      utts_speakers = []
                  else:
                      raise ValueError("Error on end line " + line)
              # New doc
              elif len(cols) == 5:
                  if debug:
                      print("New doc")
                  if cols[0] == "#begin":
                      name = re.match(r"\((.*)\);", cols[2]).group(1)
                      try:
                          part = cols[4]
                      except ValueError:
                          print("Error parsing document part " + line)
                      if debug:
                          print("New doc", name, part, name[:2])
                      tokens = []
                      corefs = []
                      index = 0
                  else:
                      raise ValueError("Error on begin line " + line)
              # Inside utterance
              elif len(cols) > 7:
                  if debug:
                      print("Inside utterance")
                  assert cols[0] == name and int(cols[1]) == int(
                      part
                  ), ("Doc name or part error " + line)
                  assert int(cols[2]) == index, "Index error on " + line
                  if speaker:
                      assert cols[9] == speaker, (
                          "Speaker changed in " + line + speaker
                      )
                  else:
                      speaker = cols[9]
                      if debug:
                          print("speaker", speaker)
                  if cols[-1] != "-":
                      coref_expr = cols[-1].split("|")
                      if debug:
                          print("coref_expr", coref_expr)
                      if not coref_expr:
                          raise ValueError(
                              "Coref expression empty " + line
                          )
                      for tok in coref_expr:
                          if debug:
                              print("coref tok", tok)
                          try:
                              match = re.match(
                                  r"^(\(?)(\d+)(\)?)$", tok
                              )
                          except:
                              print(
                                  "error getting coreferences for line "
                                  + line
                              )
                          assert match is not None, (
                              "Error parsing coref "
                              + tok
                              + " in "
                              + line
                          )
                          num = match.group(2)
                          assert num is not "", (
                              "Error parsing coref "
                              + tok
                              + " in "
                              + line
                          )
                          if match.group(1) == "(":
                              if debug:
                                  print("New coref", num)
                              corefs.append(
                                  {
                                      "label": num,
                                      "start": index,
                                      "end": None,
                                  }
                              )
                          if match.group(3) == ")":
                              j = None
                              for i in range(len(corefs) - 1, -1, -1):
                                  if debug:
                                      print("i", i)
                                  if (
                                      corefs[i]["label"] == num
                                      and corefs[i]["end"] is None
                                  ):
                                      j = i
                                      break
                              assert j is not None, (
                                  "coref closing error " + line
                              )
                              if debug:
                                  print("End coref", num)
                              corefs[j]["end"] = index
                  tokens.append(clean_token(cols[3]))
                  index += 1
              else:
                  raise ValueError("Line not standard " + line)
      return docs
  
imports: import re
  import argparse
  import time
  import os
  import io
  import pickle
  import spacy
  import numpy
  from tqdm import tqdm
  from neuralcoref.train.compat import unicode_
  from neuralcoref.train.document import Mention, Document, Speaker, EmbeddingExtractor, MISSING_WORD, extract_mentions_spans
  from neuralcoref.train.utils import parallel_process
label_desc: Use image node_id 4 for calling a global function with example usage: load_file(full_name, debug) and returns: docs