code: def compute_scatter_subwords(top_groups, w2v_loc):
      """
      Compute 2D vectors of the provided phrases groups
  
      Args:
          top_groups: A list of group-representative phrases (List(String))
          w2v_loc: A path to a w2v model (String)
  
      Returns:
          A tuple (phrases, x, y, n)
          WHERE:
          phrases: A list of phrases that are part of the model
          x: A DataFrame column as the x values of the phrase vector
          y: A DataFrame column as the y values of the phrase vector
          n: The number of computed vectors
      """
      x_feature, np_indices = [], []
      in_ctr = 0
  
      try:
          if path.isfile(w2v_loc):
              logger.info(
                  "computing scatter on %s groups", str(len(top_groups))
              )
              model = FasttextEmbeddingsModel.load(w2v_loc)
              for a in top_groups:
                  x_feature.append(model[a])
                  np_indices.append(a)
                  in_ctr += 1
              logger.info(
                  "topics found in model out of %s: %s.",
                  str(len(top_groups)),
                  str(in_ctr),
              )
              if len(np_indices) == 0:
                  logger.error("no vectors extracted")
                  return None, None, None, 0
              logger.info("computing TSNE embedding...")
              tsne = TSNE(
                  n_components=2, random_state=0, method="exact"
              )
              numpy.set_printoptions(suppress=True)
              x_tsne = tsne.fit_transform(x_feature)
              df = pd.DataFrame(
                  x_tsne, index=np_indices, columns=["x", "y"]
              )
              return np_indices, df["x"], df["y"], in_ctr
          logger.error(
              "no model found for cumputing scatter, skipping step."
          )
          return None, None, None, 0
      except Exception as e:
          logger.error(str(e))
  
imports: import argparse
  import csv
  import logging
  import operator
  import os
  import sys
  from os import path
  from pathlib import Path
  from shutil import copyfile
  import numpy
  import pandas
  from sklearn.manifold import TSNE
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.embedding import FasttextEmbeddingsModel
  from nlp_architect.utils.io import check_size, validate_existing_filepath
  from nlp_architect.utils.text import simple_normalizer
label_desc: Use image node_id 3 for calling a global function with example usage: compute_scatter_subwords(top_groups, w2v_loc) and returns: None,  None,  None,  int, np_indices,  df,  df,  in_ctr, None,  None,  None,  int