class_docstr: Randomly splits items.
  
  # Arguments
      probs: `Sequence` of probabilities that must sum to one. The length of the
          `Sequence` is the number of groups to to split the items into.
      seed: Internal seed used for shuffling the items. Define this if you need
          reproducible results.
  
  # Examples
  
      Split data into three random groups.
  
      ```python
      idmap = IDMap(["file1", "file2", "file3", "file4"])
  
      data_splitter = RandomSplitter([0.6, 0.2, 0.2], seed=42)
      splits = data_splitter(idmap)
  
      np.testing.assert_equal(splits, [[1, 3], [0], [2]])
      ```
docstr: Randomly splits `ids` based on parameters passed to the constructor of this class.
  
  # Arguments
      idmap: idmap used for getting ids.
docstr_tok: ["Randomly","splits","`","ids","`","based","on","parameters","passed","to","the","constructor","of","this","class",".","#","Arguments","idmap",":","idmap","used","for","getting","ids","."]
code: def split(self, records: Sequence[BaseRecord]):
      """Randomly splits `ids` based on parameters passed to the constructor of this class.
  
      # Arguments
          idmap: idmap used for getting ids.
      """
      # calculate split indexes
      p = np.array(self.probs) * len(
          records
      )  # convert percentage to absolute
      p = np.ceil(p).astype(
          int
      )  # round up, so each split has at least one example
      p[p.argmax()] -= sum(p) - len(
          records
      )  # removes excess from split with most items
      p = np.cumsum(p)
  
      with np_local_seed(self.seed):
          shuffled = np.random.permutation(
              [record.record_id for record in records]
          )
  
      return np.split(shuffled, p.tolist())[:-1]
  
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
label_desc: Use image node_id 2 for calling the RandomSplitter obj's underlying member method code with example usage: obj.split(records) and returns: np