<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _chunk_getitem(self, chunk_coords, chunk_selection, out, out_selection, drop_axes=None, fields=None):
 """Obtain part or whole of a chunk. Parameters chunk_coords : tuple of ints Indices of the chunk. chunk_selection : selection Location of region within the chunk to extract. out : ndarray Array to store result in. out_selection : selection Location of region within output array to store results in. drop_axes : tuple of ints Axes to squeeze out of the chunk. fields TODO """


        assert len(chunk_coords) == len(self._cdata_shape)

        # obtain key for chunk
        ckey = self._chunk_key(chunk_coords)

        try:
            # obtain compressed data for chunk
            cdata = self.chunk_store[ckey]

        except KeyError:
            # chunk not initialized
            if self._fill_value is not None:
                if fields:
                    fill_value = self._fill_value[fields]
                else:
                    fill_value = self._fill_value
                out[out_selection] = fill_value

        else:

            if (isinstance(out, np.ndarray) and
                    not fields and
                    is_contiguous_selection(out_selection) and
                    is_total_slice(chunk_selection, self._chunks) and
                    not self._filters and
                    self._dtype != object):

                dest = out[out_selection]
                write_direct = (
                    dest.flags.writeable and (
                        (self._order == 'C' and dest.flags.c_contiguous) or
                        (self._order == 'F' and dest.flags.f_contiguous)
                    )
                )

                if write_direct:

                    # optimization: we want the whole chunk, and the destination is
                    # contiguous, so we can decompress directly from the chunk
                    # into the destination array

                    if self._compressor:
                        self._compressor.decode(cdata, dest)
                    else:
                        chunk = ensure_ndarray(cdata).view(self._dtype)
                        chunk = chunk.reshape(self._chunks, order=self._order)
                        np.copyto(dest, chunk)
                    return

            # decode chunk
            chunk = self._decode_chunk(cdata)

            # select data from chunk
            if fields:
                chunk = chunk[fields]
            tmp = chunk[chunk_selection]
            if drop_axes:
                tmp = np.squeeze(tmp, axis=drop_axes)

            # store selected data in output
            out[out_selection] = tmp