code: def SetRange(self, range_offset, range_size):
      
      if self._is_open:
        raise IOError('Already open.')
  
      if range_offset < 0:
        raise ValueError(
            'Invalid range offset: {0:d} value out of bounds.'.format(
                range_offset))
  
      if range_size < 0:
        raise ValueError(
            'Invalid range size: {0:d} value out of bounds.'.format(
                range_size))
  
      self._range_offset = range_offset
      self._range_size = range_size
      self._current_offset = 0
docs: Sets the data range (offset and size).
  
      The data range is used to map a range of data within one file
      (e.g. a single partition within a full disk image) as a file-like object.
  
      Args:
        range_offset (int): start offset of the data range.
        range_size (int): size of the data range.
  
      Raises:
        IOError: if the file-like object is already open.
        OSError: if the file-like object is already open.
        ValueError: if the range offset or range size is invalid.