def _consolidate(self, inplace=False):
inplace = validate_bool_kwarg(inplace, '<STR_LIT>')<EOL>if inplace:<EOL><INDENT>self._consolidate_inplace()<EOL><DEDENT>else:<EOL><INDENT>f = lambda: self._data.consolidate()<EOL>cons_data = self._protect_consolidate(f)<EOL>return self._constructor(cons_data).__finalize__(self)<EOL><DEDENT>
Compute NDFrame with "consolidated" internals (data of each dtype
grouped together in a single ndarray).

Parameters
----------
inplace : boolean, default False
    If False return new object, otherwise modify existing object

Returns
-------
consolidated : same type as caller