def __init__(self, arg, k, by=None):
    if (by is None):
        by = arg.count()
    if (not isinstance(arg, ir.ColumnExpr)):
        raise TypeError(arg)
    if ((not isinstance(k, int)) or (k < 0)):
        raise ValueError('k must be positive integer, was: {0}'.format(k))
    super().__init__(arg, k, by)
def __init__(self, arg, k, by=None):
    if (by is None):
        by = arg.count()
    if (not isinstance(arg, ir.ColumnExpr)):
        raise TypeError(arg)
    if ((not isinstance(k, int)) or (k < 0)):
        raise ValueError('k must be positive integer, was: {0}'.format(k))
    super().__init__(arg, k, by)