def unstack(self, unstacker_func, fill_value):
n_rows = self.shape[-<NUM_LIT:1>]<EOL>dummy = unstacker_func(np.empty((<NUM_LIT:0>, <NUM_LIT:0>)), value_columns=self.items)<EOL>new_columns = dummy.get_new_columns()<EOL>new_index = dummy.get_new_index()<EOL>new_blocks = []<EOL>columns_mask = []<EOL>for blk in self.blocks:<EOL><INDENT>blocks, mask = blk._unstack(<EOL>partial(unstacker_func,<EOL>value_columns=self.items[blk.mgr_locs.indexer]),<EOL>new_columns,<EOL>n_rows,<EOL>fill_value<EOL>)<EOL>new_blocks.extend(blocks)<EOL>columns_mask.extend(mask)<EOL><DEDENT>new_columns = new_columns[columns_mask]<EOL>bm = BlockManager(new_blocks, [new_columns, new_index])<EOL>return bm<EOL>
Return a blockmanager with all blocks unstacked.

        Parameters
        ----------
        unstacker_func : callable
            A (partially-applied) ``pd.core.reshape._Unstacker`` class.
        fill_value : Any
            fill_value for newly introduced missing values.

        Returns
        -------
        unstacked : BlockManager