code: def slice_global_to_local(self, index_slice, axis=0):
          
          if index_slice.stop < self.__mask[axis].start+self.__halos[0][axis]:
              return None
  
          if index_slice.start > self.__mask[axis].stop-self.__halos[1][axis]:
              return None
  
          local_start = self.int_global_to_local_start(index_slice.start, axis)
          local_stop = self.int_global_to_local_stop(index_slice.stop, axis)
  
          return slice(local_start,local_stop,index_slice.step)
docs: Calculate start and stop index for mapping sliced index
  
          :param index_slice: sliced index?
          :param axis: current axis to calculate
          :return: slice object as calculated