class_docstr: Split matching a subsplit of the given split.
class_docstr_tok: ["Split","matching","a","subsplit","of","the","given","split","."]
code: def _absolute_to_read_instruction_for_index(
      self,
      abs_inst,
      split_infos: splits_lib.SplitDict,
  ) -> splits_lib.ReadInstruction:
      start = abs_inst.from_ or 0
      if abs_inst.to is None:  # Note: `abs_inst.to == 0` is valid
          end = split_infos[abs_inst.splitname].num_examples
      else:
          end = abs_inst.to
  
      assert end >= start, f"start={start}, end={end}"
      num_examples = end - start
  
      examples_per_split = num_examples // self.count
      split_start = start + examples_per_split * self.index
      split_end = start + examples_per_split * (self.index + 1)
  
      # Handle remaining examples.
      num_unused_examples = num_examples % self.count
      assert num_unused_examples >= 0, num_unused_examples
      assert num_unused_examples < self.count, num_unused_examples
      if num_unused_examples > 0:
          if self.drop_remainder:
              logging.warning(
                  "Dropping %d examples of %d examples (host count: %d).",
                  num_unused_examples,
                  num_examples,
                  self.count,
              )
          else:
              split_start += min(self.index, num_unused_examples)
              split_end += min(self.index + 1, num_unused_examples)
  
      return splits_lib.ReadInstruction(
          abs_inst.splitname,
          from_=split_start,
          to=split_end,
          unit="abs",
      )
  
file_path: datasets/tensorflow_datasets/core/subsplits_utils.py
imports: import dataclasses
  import functools
  import operator
  from typing import List, Optional
  from absl import logging
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core import splits
label_desc: Use image node_id 2 for calling the _EvenSplit obj's underlying member method code with example usage: obj._absolute_to_read_instruction_for_index(abs_inst, split_infos) and returns: splits_lib