docstr: Prepare feature array:
      mentions_spans: (N, S)
      mentions_words: (N, W)
      mentions_features: (N, Fs)
      mentions_labels: (N, 1)
      mentions_pairs_start_index: (N, 1) index of beggining of pair list in pair_labels
      mentions_pairs_length: (N, 1) number of pairs (i.e. nb of antecedents) for each mention
      pairs_features: (P, Fp)
      pairs_labels: (P, 1)
      pairs_ant_idx: (P, 1) => indexes of antecedents mention for each pair (mention index in doc)
code: def get_feature_array(
      self, doc_id, feature=None, compressed=True, debug=False
  ):
      """
      Prepare feature array:
          mentions_spans: (N, S)
          mentions_words: (N, W)
          mentions_features: (N, Fs)
          mentions_labels: (N, 1)
          mentions_pairs_start_index: (N, 1) index of beggining of pair list in pair_labels
          mentions_pairs_length: (N, 1) number of pairs (i.e. nb of antecedents) for each mention
          pairs_features: (P, Fp)
          pairs_labels: (P, 1)
          pairs_ant_idx: (P, 1) => indexes of antecedents mention for each pair (mention index in doc)
      """
      if not self.mentions:
          if debug:
              print("No mention in this doc !")
          return {}
      if debug:
          print("🛎 features matrices")
      mentions_spans = []
      mentions_words = []
      mentions_features = []
      pairs_ant_idx = []
      pairs_features = []
      pairs_labels = []
      mentions_labels = []
      mentions_pairs_start = []
      mentions_pairs_length = []
      mentions_location = []
      n_mentions = 0
      total_pairs = 0
      if debug:
          print(
              "mentions",
              self.mentions,
              str([m.gold_label for m in self.mentions]),
          )
      for mention_idx, antecedents_idx in list(
          self.get_candidate_pairs(
              max_distance=None, max_distance_with_match=None
          )
      ):
          n_mentions += 1
          mention = self.mentions[mention_idx]
          mentions_spans.append(mention.spans_embeddings)
          w_idx = mention_words_idx(self.embed_extractor, mention)
          if w_idx is None:
              print(
                  "error in",
                  self.name,
                  self.part,
                  mention.utterance_index,
              )
          mentions_words.append(w_idx)
          mentions_features.append(
              self.get_single_mention_features_conll(
                  mention, compressed
              )
          )
          mentions_location.append(
              [
                  mention.start,
                  mention.end,
                  mention.utterance_index,
                  mention_idx,
                  doc_id,
              ]
          )
          ants = [self.mentions[ant_idx] for ant_idx in antecedents_idx]
          no_antecedent = (
              not any(
                  ant.gold_label == mention.gold_label for ant in ants
              )
              or mention.gold_label is None
          )
          if antecedents_idx:
              pairs_ant_idx += [idx for idx in antecedents_idx]
              pairs_features += [
                  self.get_pair_mentions_features_conll(
                      ant, mention, compressed
                  )
                  for ant in ants
              ]
              ant_labels = (
                  [0 for ant in ants]
                  if no_antecedent
                  else [
                      1 if ant.gold_label == mention.gold_label else 0
                      for ant in ants
                  ]
              )
              pairs_labels += ant_labels
          mentions_labels.append(1 if no_antecedent else 0)
          mentions_pairs_start.append(total_pairs)
          total_pairs += len(ants)
          mentions_pairs_length.append(len(ants))
  
      out_dict = {
          FEATURES_NAMES[0]: mentions_features,
          FEATURES_NAMES[1]: mentions_labels,
          FEATURES_NAMES[2]: mentions_pairs_length,
          FEATURES_NAMES[3]: mentions_pairs_start,
          FEATURES_NAMES[4]: mentions_spans,
          FEATURES_NAMES[5]: mentions_words,
          FEATURES_NAMES[6]: pairs_ant_idx if pairs_ant_idx else None,
          FEATURES_NAMES[7]: pairs_features if pairs_features else None,
          FEATURES_NAMES[8]: pairs_labels if pairs_labels else None,
          FEATURES_NAMES[9]: [mentions_location],
          FEATURES_NAMES[10]: [self.conll_tokens],
          FEATURES_NAMES[11]: [self.conll_lookup],
          FEATURES_NAMES[12]: [
              {
                  "name": self.name,
                  "part": self.part,
                  "utterances": list(str(u) for u in self.utterances),
                  "mentions": list(str(m) for m in self.mentions),
              }
          ],
      }
      if debug:
          print("🚘 Summary")
          for k, v in out_dict.items():
              print(k, len(v))
      return n_mentions, total_pairs, out_dict
  
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 6 for calling the ConllDoc obj's underlying member method code with example usage: obj.get_feature_array(doc_id, feature, compressed, debug) and returns: n_mentions,  total_pairs,  out_dict, dict