code: def cumcount(groupby, ascending: bool = True):
      op = GroupByCumcount(ascending=ascending)
      return op(groupby)
  
imports: import numpy
  import pandas
  from ...None import opcodes
  from ...core import OutputType
  from ...serialization.serializables import BoolField, AnyField
  from ...utils import lazy_import
  from ..utils import parse_index, build_empty_df, build_empty_series, validate_axis
  from ..operands import DataFrameOperandMixin, DataFrameOperand
label_desc: Use image node_id 1 for calling a global function with example usage: cumcount(groupby, ascending) and returns: op