code: def test_multilevel_consolidate(self):
      index = MultiIndex.from_tuples(
          [
              ("foo", "one"),
              ("foo", "two"),
              ("bar", "one"),
              ("bar", "two"),
          ]
      )
      df = DataFrame(
          np.random.default_rng(2).standard_normal((4, 4)),
          index=index,
          columns=index,
      )
      df["Totals", ""] = df.sum(1)
      df = df._consolidate()
  
imports: import datetime
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, MultiIndex, Series
  import pandas._testing
label_desc: Use image node_id 10 for calling the TestMultiLevel obj's underlying member method code with example usage: obj.test_multilevel_consolidate() without return types