def _interleave(self):
from pandas.core.dtypes.common import is_sparse<EOL>dtype = _interleaved_dtype(self.blocks)<EOL>if is_sparse(dtype):<EOL><INDENT>dtype = dtype.subtype<EOL><DEDENT>elif is_extension_array_dtype(dtype):<EOL><INDENT>dtype = '<STR_LIT:object>'<EOL><DEDENT>result = np.empty(self.shape, dtype=dtype)<EOL>itemmask = np.zeros(self.shape[<NUM_LIT:0>])<EOL>for blk in self.blocks:<EOL><INDENT>rl = blk.mgr_locs<EOL>result[rl.indexer] = blk.get_values(dtype)<EOL>itemmask[rl.indexer] = <NUM_LIT:1><EOL><DEDENT>if not itemmask.all():<EOL><INDENT>raise AssertionError('<STR_LIT>')<EOL><DEDENT>return result<EOL>
Return ndarray from blocks with specified item order
Items must be contained in the blocks