def getitem_block(self, slicer, new_mgr_locs=None):
if new_mgr_locs is None:<EOL><INDENT>if isinstance(slicer, tuple):<EOL><INDENT>axis0_slicer = slicer[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>axis0_slicer = slicer<EOL><DEDENT>new_mgr_locs = self.mgr_locs[axis0_slicer]<EOL><DEDENT>new_values = self._slice(slicer)<EOL>if self._validate_ndim and new_values.ndim != self.ndim:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return self.make_block_same_class(new_values, new_mgr_locs)<EOL>
Perform __getitem__-like, return result as block.

As of now, only supports slices that preserve dimensionality.