code: def fetch_pc(emb, weights, train_loader, pc_path, RESET):
      sentences = torch.cat([d[1][0] for d in train_loader]).int()
      emb_dataset = apply_weights(emb, weights, sentences)
  
      if not os.path.exists(pc_path) or RESET:
          _, _, V = torch.svd(
              emb_dataset - emb_dataset.mean(dim=0), some=True
          )
          v = V[:, 0].unsqueeze(-1)
          u = v.mm(v.t())
          with open(pc_path, "wb") as file:
              pickle.dump(u, file)
      else:
          with open(pc_path, "rb") as file:
              u = pickle.load(file)
      return u
  
imports: import json
  import os
  import pickle
  from collections import Counter, OrderedDict
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from gensim.models import FastText
  from nltk.tokenize import sent_tokenize, word_tokenize
  from scipy.linalg import eig
  from skimage.filters import threshold_yen
label_desc: Use image node_id 4 for calling a global function with example usage: fetch_pc(emb, weights, train_loader, pc_path, RESET) and returns: u