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_values(self):
      values = self.values
  
      # place the values
      length, width = self.full_shape
      stride = values.shape[1]
      result_width = width * stride
      result_shape = (length, result_width)
      mask = self.mask
      mask_all = mask.all()
  
      # we can simply reshape if we don't have a mask
      if mask_all and len(values):
          new_values = (
              self.sorted_values.reshape(length, width, stride)
              .swapaxes(1, 2)
              .reshape(result_shape)
          )
          new_mask = np.ones(result_shape, dtype=bool)
          return new_values, new_mask
  
      # if our mask is all True, then we can use our existing dtype
      if mask_all:
          dtype = values.dtype
          new_values = np.empty(result_shape, dtype=dtype)
      else:
          dtype, fill_value = maybe_promote(
              values.dtype, self.fill_value
          )
          new_values = np.empty(result_shape, dtype=dtype)
          new_values.fill(fill_value)
  
      new_mask = np.zeros(result_shape, dtype=bool)
  
      name = np.dtype(dtype).name
      sorted_values = self.sorted_values
  
      # we need to convert to a basic dtype
      # and possibly coerce an input to our output dtype
      # e.g. ints -> floats
      if needs_i8_conversion(values):
          sorted_values = sorted_values.view("i8")
          new_values = new_values.view("i8")
          name = "int64"
      elif is_bool_dtype(values):
          sorted_values = sorted_values.astype("object")
          new_values = new_values.astype("object")
          name = "object"
      else:
          sorted_values = sorted_values.astype(name, copy=False)
  
      # fill in our values & mask
      f = getattr(_reshape, "unstack_{name}".format(name=name))
      f(
          sorted_values,
          mask.view("u1"),
          stride,
          length,
          width,
          new_values,
          new_mask.view("u1"),
      )
  
      # reconstruct dtype if needed
      if needs_i8_conversion(values):
          new_values = new_values.view(values.dtype)
  
      return new_values, new_mask
  
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 5 for calling the _Unstacker obj's underlying member method code with example usage: obj.get_new_values() and returns: new_values,  new_mask, new_values,  new_mask