code: def get_dataset_embeddings(
      args: Args, instruction: str, model: INSTRUCTOR
  ) -> tuple[Dataset, np.ndarray]:
      all_datasets: list[Dataset] = []
      all_embeddings: list[np.ndarray] = []
      for data_file in args.data_files:
          raw_dataset = load_dataset(
              "json", data_files=[data_file], split="train"
          )
          all_datasets.append(raw_dataset)
  
          embeddings = get_dataset_embedding(
              model,
              args.model_key,
              args.embedding_mode,
              raw_dataset,
              instruction,
              args.batch_size,
          )
          all_embeddings.append(embeddings)
  
      raw_dataset = concatenate_datasets(all_datasets)
      embeddings = np.concatenate(all_embeddings, axis=0)
      return raw_dataset, embeddings
  
imports: from dataclasses import dataclass, field
  from typing import Literal, cast
  from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
  import matplotlib.pyplot
  import numpy
  from appdirs import user_cache_dir
  from datasets import Dataset, concatenate_datasets, load_dataset
  from InstructorEmbedding import INSTRUCTOR
  from joblib import Memory
  from sentence_transformers.util import cos_sim
  from sklearn.cluster import KMeans
  from sklearn.manifold import TSNE
  from transformers import HfArgumentParser
  from matplotlib.font_manager import FontProperties
  import random
  import sys
  from prompt_template import SRC_INSTRUCT_ILLUSTRATION_PROMPT
  from collections import Counter
  from adjustText import adjust_text
  import matplotlib.colors
  from matplotlib.colors import to_rgba, to_hex
label_desc: Use image node_id 2 for calling a global function with example usage: get_dataset_embeddings(args, instruction, model) and returns: raw_dataset,  embeddings