code: def read_corpus(self, data_path, model=None, debug=False):
      print("🌋 Reading files")
      for dirpath, _, filenames in os.walk(data_path):
          print("In", dirpath, os.path.abspath(dirpath))
          file_list = [
              os.path.join(dirpath, f)
              for f in filenames
              if f.endswith(".v4_auto_conll")
              or f.endswith(".v4_gold_conll")
          ]
          cleaned_file_list = []
          for f in file_list:
              fn = f.split(".")
              if fn[1] == "v4_auto_conll":
                  gold = fn[0] + "." + "v4_gold_conll"
                  if gold not in file_list:
                      cleaned_file_list.append(f)
              else:
                  cleaned_file_list.append(f)
          doc_list = parallel_process(cleaned_file_list, load_file)
          for (
              docs
          ) in (
              doc_list
          ):  # executor.map(self.load_file, cleaned_file_list):
              for (
                  utts_text,
                  utt_tokens,
                  utts_corefs,
                  utts_speakers,
                  name,
                  part,
              ) in docs:
                  if debug:
                      print("Imported", name)
                      print("utts_text", utts_text)
                      print("utt_tokens", utt_tokens)
                      print("utts_corefs", utts_corefs)
                      print("utts_speakers", utts_speakers)
                      print("name, part", name, part)
                  self.utts_text += utts_text
                  self.utts_tokens += utt_tokens
                  self.utts_corefs += utts_corefs
                  self.utts_speakers += utts_speakers
                  self.utts_doc_idx += [len(self.docs_names)] * len(
                      utts_text
                  )
                  self.docs_names.append((name, part))
      print("utts_text size", len(self.utts_text))
      print("utts_tokens size", len(self.utts_tokens))
      print("utts_corefs size", len(self.utts_corefs))
      print("utts_speakers size", len(self.utts_speakers))
      print("utts_doc_idx size", len(self.utts_doc_idx))
      print("🌋 Building docs")
      for name, part in self.docs_names:
          self.docs.append(
              ConllDoc(
                  name=name,
                  part=part,
                  nlp=None,
                  blacklist=self.blacklist,
                  consider_speakers=True,
                  embedding_extractor=self.embed_extractor,
                  conll=CONLL_GENRES[name[:2]],
              )
          )
      print("🌋 Loading spacy model")
  
      if model is None:
          model_options = [
              "en_core_web_lg",
              "en_core_web_md",
              "en_core_web_sm",
              "en",
          ]
          for model_option in model_options:
              if not model:
                  try:
                      spacy.info(model_option)
                      model = model_option
                      print("Loading model", model_option)
                  except:
                      print("Could not detect model", model_option)
          if not model:
              print("Could not detect any suitable English model")
              return
      else:
          spacy.info(model)
          print("Loading model", model)
      nlp = spacy.load(model)
      print(
          "🌋 Parsing utterances and filling docs with use_gold_mentions="
          + (str(bool(self.gold_mentions)))
      )
      doc_iter = (s for s in self.utts_text)
      for utt_tuple in tqdm(
          zip(
              nlp.pipe(doc_iter),
              self.utts_tokens,
              self.utts_corefs,
              self.utts_speakers,
              self.utts_doc_idx,
          )
      ):
          (
              spacy_tokens,
              conll_tokens,
              corefs,
              speaker,
              doc_id,
          ) = utt_tuple
          if debug:
              print(
                  unicode_(self.docs_names[doc_id]), "-", spacy_tokens
              )
          doc = spacy_tokens
          if debug:
              out_str = (
                  "utterance "
                  + unicode_(doc)
                  + " corefs "
                  + unicode_(corefs)
                  + " speaker "
                  + unicode_(speaker)
                  + "doc_id"
                  + unicode_(doc_id)
              )
              print(out_str.encode("utf-8"))
          self.docs[doc_id].add_conll_utterance(
              doc,
              conll_tokens,
              corefs,
              speaker,
              use_gold_mentions=self.gold_mentions,
          )
  
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 7 for calling the ConllCorpus obj's underlying member method code with example usage: obj.read_corpus(data_path, model, debug) without return types