code: def _stratified_split_parallel_worker(
      idxs_to_split: Iterable[Any],
      test_p: float,
      seed: int,
      force_split: bool,
  ) -> np.array:
      try:
          _, test_idxs = train_test_split(
              idxs_to_split,
              test_size=test_p,
              random_state=seed,
              shuffle=True,
              stratify=np.ones_like(idxs_to_split),
          )
      except ValueError as ve:
          if "the resulting train set will be empty" in str(ve):
              if force_split is False:
                  raise ValueError(
                      "Unable to stratify split on users - the ``interactions`` object contains users"
                      " with a single interaction. Either set ``force_split = True`` to put all users"
                      " with a single interaction in the training set or run"
                      " ``collie.utils.remove_users_with_fewer_than_n_interactions`` first."
                  )
              else:
                  test_idxs = []
  
      return test_idxs
  
file_path: collie/collie/cross_validation.py
imports: from collections import defaultdict
  import functools
  import operator
  from typing import Any, Iterable, Optional, Tuple, Union
  from joblib import delayed, Parallel
  import numpy
  from scipy.sparse import coo_matrix
  from sklearn.model_selection import train_test_split
  from collie.interactions import BaseInteractions, ExplicitInteractions, HDF5Interactions, Interactions
  from collie.utils import get_random_seed
label_desc: Use image node_id 5 for calling a global function with example usage: _stratified_split_parallel_worker(idxs_to_split, test_p, seed, force_split) and returns: test_idxs