code: def load_precalculated_predictions(
      pred_format: str = "predictions",
      as_train_test: bool = True,
      use_full_size: bool = False,
  ) -> t.Union[np.array, t.Tuple[np.array, np.array]]:
      """Load and return a precalculated predictions for the dataset.
  
      Parameters
      ----------
      pred_format : str, default: 'predictions'
          Represent the format of the returned value. Can be 'predictions' or 'probabilities'.
          'predictions' will return the predicted class for each sample.
          'probabilities' will return the predicted probabilities for each sample.
      as_train_test : bool, default: True
          If True, the returned data is split into train and test exactly like the toy model
          was trained. The first return value is the train data and the second is the test data.
          Otherwise, returns a single object.
      use_full_size : bool, default: False
          If True, the returned data will be the full dataset, otherwise returns a subset of the data.
      Returns
      -------
      predictions : np.ndarray
          The prediction of the data elements in the dataset.
  
      """
      if use_full_size:
          raise NotImplementedError(
              "Predictions for the full dataset are not yet available."
          )
      all_preds = read_and_save_data(
          ASSETS_DIR,
          "just_dance_probabilities.csv",
          _SHORT_PROBAS_URL,
          to_numpy=True,
          file_type="npy",
      )
  
      if pred_format == "predictions":
          all_preds = np.array(all_preds) > 0.5
          all_preds = all_preds.astype(int)
      elif pred_format != "probabilities":
          raise ValueError(
              'pred_format must be either "predictions" or "probabilities"'
          )
  
      if as_train_test:
          train_indexes, test_indexes = _get_train_test_indexes()
          return all_preds[train_indexes], all_preds[test_indexes]
      else:
          return all_preds
  
file_path: deepchecks/deepchecks/nlp/datasets/classification/just_dance_comment_analysis.py
imports: import pathlib
  import typing
  import warnings
  import numpy
  import pandas
  from deepchecks.nlp import TextData
  from deepchecks.utils.builtin_datasets_utils import read_and_save_data
label_desc: Use image node_id 1 for calling a global function with example usage: load_precalculated_predictions(pred_format, as_train_test, use_full_size) and returns: all_preds,  all_preds, all_preds