class_docstr: A wrapper class for an array that allows for relative indexing.
  
  Args:
      array (np.ndarray): The array to wrap.
      range (Optional[Tuple[int, int]]): The range of the array to expose. Defaults to (1, -1).
class_docstr_tok: ["A","wrapper","class","for","an","array","that","allows","for","relative","indexing",".","Args",":","array","(","np.ndarray",")",":","The","array","to","wrap",".","range","(","Optional","[","Tuple","[","int",",","int","]","]",")",":","The","range","of","the","array","to","expose",".","Defaults","to","(","1",",","-1",")","."]
code: def _process_index(self, index):
      if isinstance(index, slice):
          index = slice(
              (index.start or 0) + self.range[0],
              self.range[0]
              + (len(self) if index.stop is None else index.stop),
              index.step,
          )
          if index.stop > len(self.array):
              raise IndexError
      else:
          index = index + self.range[0]
          if index > len(self):
              raise IndexError
      return index
  
imports: from collections import deque
  import operator
  import itertools
  from typing import Optional, List, Tuple
  import numpy
  import warnings
label_desc: Use image node_id 3 for calling the PaddedArray obj's underlying member method code with example usage: obj._process_index(index) and returns: index