Returns the chunk following this chunk in the list of free chunks. If this chunk is not free, then it resides in
        no such list and this method raises an error.

        :returns: If possible, the forward chunk; otherwise, raises an error
433752
def fwd_chunk(self):
        
        if self.is_free():
            base = self.state.memory.load(self.base + 2 * self._chunk_size_t_size, self._chunk_size_t_size)
            return PTChunk(base, self.state)
        else:
            raise SimHeapError("Attempted to access the forward chunk of an allocated chunk")
261834
def bck_chunk(self):
        
        raise NotImplementedError("%s not implemented for %s" % (self.bck_chunk.__func__.__name__,
                                                                 self.__class__.__name__))
433946
public ChunkInputStream next() {
        throwIfChunkNotFullyRead();

        // Before return next chunk, catalog current chunk in manifest.
        addEntry();

        long chunkSize = calculateNextChunkSize();
        String chunkId = manifest.nextChunkId();

        InputStream buffIS = new BufferedInputStream(largeStream, BUFFER_SIZE);
        return currentChunk = new ChunkInputStream(chunkId,
                                                   buffIS,
                                                   chunkSize,
                                                   preserveChunkMD5s);
    }
703589
def forward(self):
        
        if self._index >= len(self._history) - 1:
            return None
        self._index += 1
        self._check_index()
        return self.current_item
1018443
def _GetChunkForReading(self, chunk):
    """"""
    offset = chunk * self._HASH_SIZE
    self.index.seek(offset)

    chunk_name = self.index.read(self._HASH_SIZE)

    try:
      return self.chunk_cache.Get(chunk_name)
    except KeyError:
      pass

    # We don't have this chunk already cached. The most common read
    # access pattern is contiguous reading so since we have to go to
    # the data store already, we read ahead to reduce round trips.
    self.index.seek(offset)
    readahead = []

    for _ in range(self._READAHEAD):
      name = self.index.read(self._HASH_SIZE)
      if name and name not in self.chunk_cache:
        readahead.append(rdf_objects.BlobID.FromBytes(name))

    self._ReadChunks(readahead)
    try:
      return self.chunk_cache.Get(chunk_name)
    except KeyError:
      raise aff4.ChunkNotFoundError("Cannot open chunk %s" % chunk)
556160
def fwd_chunk(self):
        
        raise NotImplementedError("%s not implemented for %s" % (self.fwd_chunk.__func__.__name__,
                                                                 self.__class__.__name__))
103670
def get_chunks(sequence, chunk_size):
    
    return [
        sequence[idx:idx + chunk_size]
        for idx in range(0, len(sequence), chunk_size)
    ]
161305
def forward_list(self):
        '''
        
        '''
        version = self.version()
        if int(version[1]) <= 1 and int(version[2]) <= 0 and int(version[3]) < 31:
            raise EnvironmentError("Low adb version.")
        lines = self.run_cmd("forward", "--list").strip().splitlines()
        return [line.strip().split() for line in lines]
994469
def next(self):
        
        try:
            result = self.data[self.index]
        except IndexError:
            self.index = 0
            raise StopIteration
        self.index += 1
        return result
922172
def next(self, type=None):
        
        i = self.stop
        s = self.sentence
        while i < len(s):
            if s[i].chunk is not None and type in (s[i].chunk.type, None):
                return s[i].chunk
            i += 1
32383
def forward(self, search: str):
        
        url_path = "/api/forward/{search}".format(search=search)
        return self._request(path=url_path)
615294
def chunks(self):
        
        if not hasattr(self, '_it'):
            class ChunkIterator(object):
                def __iter__(iter):
                    return iter

                def __next__(iter):
                    try:
                        chunk = self._next_chunk()
                    except StopIteration:
                        if self.loop:
                            self._init_stretching()
                            return iter.__next__()

                        raise

                    return chunk
                next = __next__

            self._it = ChunkIterator()

        return self._it
150287
def ChunkBy(self: dict, f=None):
    
    if f is None:
        return _chunk(self.items())
    if is_to_destruct(f):
        f = destruct_func(f)
    return _chunk(self.items(), f)
1323086
def get_chunks(self,chunk_type):
        
        for nonter,this_type in self.label_for_nonter.items():
            if this_type == chunk_type:
                subsumed = self.terms_subsumed_by_nonter.get(nonter)
                if subsumed is not None:
                    yield sorted(list(subsumed))
761706
def multiple_chunks(self, chunk_size=None):
        
        if not chunk_size:
            chunk_size = self.DEFAULT_CHUNK_SIZE
        return self.size > chunk_size
372309
def advancing(self):
        
        if self._forward:
            raise ValueError("Already advancing")
        self._forward = True
        yield
        self._forward = False
369213
def get_chunk(self):
        """"""
        while not self._eof_reached:
            read = self.input_stream.read(self.chunk_size - len(self._partial_chunk))
            if len(read) == 0:
                self._eof_reached = True
            self._partial_chunk += read
            if len(self._partial_chunk) == self.chunk_size or self._eof_reached:
                chunk = self._partial_chunk
                self._partial_chunk = ""
                return chunk