code: def view_emb_kg(emb1, emb2, dir, epoch=0):
      pca = PCA(n_components=2)
      emb = np.concatenate((emb1, emb2), axis=0)
      print(emb.shape)
      split = emb1.shape[0]
      emb = pca.fit_transform(emb)
      plt.figure(figsize=(10, 10))
      plt.scatter(emb[:split, 0], emb[:split, 1], c="green", s=100)
      plt.scatter(
          emb[split:, 0], emb[split:, 1], c="blue", marker="x", s=800
      )
      ax = plt.gca()
      annotate = {-3: "LogP", -2: "QED", -1: "Label"}
      for i, txt in annotate.items():
          ax.annotate(txt, (emb[i, 0], emb[i, 1]))
      makedirs("{}/emb".format(dir))
      plt.savefig("{}/emb/pca_{}.png".format(dir, epoch), dpi=100)
  
imports: import matplotlib.pyplot
  import numpy
  import seaborn
  from sklearn.decomposition import PCA
  from graphgym.utils.io import makedirs
label_desc: Use image node_id 2 for calling a global function with example usage: view_emb_kg(emb1, emb2, dir, epoch) without return types