code: def __init__(
      self,
      obj,
      groupby_obj=None,
      keys=None,
      axis=0,
      level=None,
      grouper=None,
      exclusions=None,
      selection=None,
      as_index=True,
      sort=True,
      group_keys=_default_group_keys,
      squeeze=False,
      observed=False,
      dropna=True,
      mutated=False,
      grouper_cache=None,
  ):
      def fill_value(v, key):
          return (
              v
              if v is not None or groupby_obj is None
              else getattr(groupby_obj, key)
          )
  
      self.obj = obj
      self.keys = fill_value(keys, "keys")
      self.axis = fill_value(axis, "axis")
      self.level = fill_value(level, "level")
      self.exclusions = fill_value(exclusions, "exclusions")
      self.selection = selection
      self.as_index = fill_value(as_index, "as_index")
      self.sort = fill_value(sort, "sort")
      self.group_keys = fill_value(group_keys, "group_keys")
      self.squeeze = fill_value(squeeze, "squeeze")
      self.observed = fill_value(observed, "observed")
      self.mutated = fill_value(mutated, "mutated")
      self.dropna = fill_value(dropna, "dropna")
  
      if groupby_obj is None:
          groupby_kw = dict(
              keys=keys,
              axis=axis,
              level=level,
              grouper=grouper,
              exclusions=exclusions,
              as_index=as_index,
              group_keys=group_keys,
              squeeze=squeeze,
              observed=observed,
              mutated=mutated,
              dropna=dropna,
          )
          if not _HAS_SQUEEZE:  # pragma: no branch
              groupby_kw.pop("squeeze")
          if not _HAS_DROPNA:  # pragma: no branch
              groupby_kw.pop("dropna")
  
          if obj.ndim == 2:
              self.groupby_obj = DataFrameGroupBy(obj, **groupby_kw)
          else:
              self.groupby_obj = SeriesGroupBy(obj, **groupby_kw)
      else:
          self.groupby_obj = groupby_obj
  
      if grouper_cache:
          self.groupby_obj.grouper._cache = grouper_cache
      if selection:
          self.groupby_obj = self.groupby_obj[selection]
  
      self.is_frame = isinstance(self.groupby_obj, DataFrameGroupBy)
  
imports: import sys
  from collections.abc import Iterable
  import cloudpickle
  import numpy
  from pandas.core.groupby import DataFrameGroupBy, SeriesGroupBy
  from ..utils import estimate_pandas_size, pd_release_version, no_default
label_desc: Use image node_id 1 to create a new GroupByWrapper object  with example: obj = GroupByWrapper(obj, groupby_obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, observed, dropna, mutated, grouper_cache)