class_docstr: Helper class to unstack data / pivot with multi-level index
  
  Parameters
  ----------
  values : ndarray
      Values of DataFrame to "Unstack"
  index : object
      Pandas ``Index``
  level : int or str, default last level
      Level to "unstack". Accepts a name for the level.
  value_columns : Index, optional
      Pandas ``Index`` or ``MultiIndex`` object if unstacking a DataFrame
  fill_value : scalar, optional
      Default value to fill in missing values if subgroups do not have the
      same set of labels. By default, missing values will be replaced with
      the default fill value for that data type, NaN for float, NaT for
      datetimelike, etc. For integer types, by default data will converted to
      float and missing values will be set to NaN.
  constructor : object
      Pandas ``DataFrame`` or subclass used to create unstacked
      response.  If None, DataFrame or SparseDataFrame will be used.
  
  Examples
  --------
  >>> index = pd.MultiIndex.from_tuples([('one', 'a'), ('one', 'b'),
  ...                                    ('two', 'a'), ('two', 'b')])
  >>> s = pd.Series(np.arange(1, 5, dtype=np.int64), index=index)
  >>> s
  one  a    1
       b    2
  two  a    3
       b    4
  dtype: int64
  
  >>> s.unstack(level=-1)
       a  b
  one  1  2
  two  3  4
  
  >>> s.unstack(level=0)
     one  two
  a    1    3
  b    2    4
  
  Returns
  -------
  unstacked : DataFrame
code: def get_new_index(self):
      result_codes = [
          lab.take(self.compressor) for lab in self.sorted_labels[:-1]
      ]
  
      # construct the new index
      if len(self.new_index_levels) == 1:
          lev, lab = self.new_index_levels[0], result_codes[0]
          if (lab == -1).any():
              lev = lev.insert(len(lev), lev._na_value)
          return lev.take(lab)
  
      return MultiIndex(
          levels=self.new_index_levels,
          codes=result_codes,
          names=self.new_index_names,
          verify_integrity=False,
      )
  
imports: from functools import partial
  import itertools
  import numpy
  from pandas._libs import algos, reshape
  from pandas._libs.sparse import IntIndex
  from pandas.compat import PY2, range, text_type, u, zip
  from pandas.core.dtypes.cast import maybe_promote
  from pandas.core.dtypes.common import ensure_platform_int, is_bool_dtype, is_extension_array_dtype, is_integer_dtype, is_list_like, is_object_dtype, needs_i8_conversion
  from pandas.core.dtypes.missing import notna
  from pandas import compat
  import pandas.core.algorithms
  from pandas.core.arrays import SparseArray
  from pandas.core.arrays.categorical import _factorize_from_iterable
  from pandas.core.frame import DataFrame
  from pandas.core.index import Index, MultiIndex
  from pandas.core.internals.arrays import extract_array
  from pandas.core.series import Series
  from pandas.core.sorting import compress_group_index, decons_obs_group_ids, get_compressed_ids, get_group_index
label_desc: Use image node_id 7 for calling the _Unstacker obj's underlying member method code with example usage: obj.get_new_index() and returns: MultiIndex, lev