code: def check_numpy_array(
      feature, array, n_mentions_list, compressed=True
  ):
      for n_mentions in n_mentions_list:
          if feature == FEATURES_NAMES[0]:
              assert array.shape[0] == len(n_mentions)
              if compressed:
                  assert np.array_equiv(
                      array[:, 3],
                      np.array([len(n_mentions)] * len(n_mentions)),
                  )
                  assert np.max(array[:, 2]) == len(n_mentions) - 1
                  assert np.min(array[:, 2]) == 0
          elif feature == FEATURES_NAMES[1]:
              assert array.shape[0] == len(n_mentions)
          elif feature == FEATURES_NAMES[2]:
              assert array.shape[0] == len(n_mentions)
              assert np.array_equiv(
                  array[:, 0], np.array(list(range(len(n_mentions))))
              )
          elif feature == FEATURES_NAMES[3]:
              assert array.shape[0] == len(n_mentions)
              assert np.array_equiv(
                  array[:, 0],
                  np.array(
                      [p * (p - 1) / 2 for p in range(len(n_mentions))]
                  ),
              )
          elif feature == FEATURES_NAMES[4]:
              assert array.shape[0] == len(n_mentions)
          elif feature == FEATURES_NAMES[5]:
              assert array.shape[0] == len(n_mentions)
          elif feature == FEATURES_NAMES[6]:
              assert (
                  array.shape[0]
                  == len(n_mentions) * (len(n_mentions) - 1) / 2
              )
              assert np.max(array) == len(n_mentions) - 2
          elif feature == FEATURES_NAMES[7]:
              if compressed:
                  assert (
                      array.shape[0]
                      == len(n_mentions) * (len(n_mentions) - 1) / 2
                  )
                  assert np.max(array[:, 7]) == len(n_mentions) - 2
                  assert np.min(array[:, 7]) == 0
          elif feature == FEATURES_NAMES[8]:
              assert (
                  array.shape[0]
                  == len(n_mentions) * (len(n_mentions) - 1) / 2
              )
  
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 3 for calling a global function with example usage: check_numpy_array(feature, array, n_mentions_list, compressed) without return types