(
        self,
        to_call_with_2_args: typing.Union[typing.Callable, InlineExpr],
        *expressions: typing.Tuple[typing.Any, ...],
        initial: typing.Union[_None, typing.Callable, typing.Any] = _none,
        prepare_first: typing.Union[
            _None, typing.Callable, InlineExpr
        ] = _none,
        default: typing.Union[_None, typing.Callable, typing.Any] = _none,
        unconditional_init: bool = False,
        where=None,
    )
Args:
          to_call_with_2_args: defines the reduce function/expression
          expressions: args to be passed to `to_call_with_2_args` after the
            aggregation value
          initial: defined the very first item to be passed to
            `to_call_with_2_args` item. If callable, then the result of a call
            is used.
          prepare_first: defines the reduce function/expression to be called
            on the first item to prepare it for subsequent calls of
            `to_call_with_2_args`
          default: defines the value to be returned when there was nothing to
            reduce in a group (e.g. the current reduce operation has filtered
            out some rows, while an adjacent reduce operation has got
            something to reduce, forming a group). If callable, then the result
            of a call is used.
          unconditional_init: tells whether the first call initializes the
            aggregation value OR there is a condition for that
Args:
          to_call_with_2_args: defines the reduce function/expression
          expressions: args to be passed to `to_call_with_2_args` after the
            aggregation value
          initial: defined the very first item to be passed to
            `to_call_with_2_args` item. If callable, then the result of a call
            is used.
          prepare_first: defines the reduce function/expression to be called
            on the first item to prepare it for subsequent calls of
            `to_call_with_2_args`
          default: defines the value to be returned when there was nothing to
            reduce in a group (e.g. the current reduce operation has filtered
            out some rows, while an adjacent reduce operation has got
            something to reduce, forming a group). If callable, then the result
            of a call is used.
          unconditional_init: tells whether the first call initializes the
            aggregation value OR there is a condition for that
Args : to_call_with_2_args : defines the reduce function / expression expressions : args to be passed to to_call_with_2_args after the aggregation value initial : defined the very first item to be passed to to_call_with_2_args item . If callable then the result of a call is used . prepare_first : defines the reduce function / expression to be called on the first item to prepare it for subsequent calls of to_call_with_2_args default : defines the value to be returned when there was nothing to reduce in a group ( e . g . the current reduce operation has filtered out some rows while an adjacent reduce operation has got something to reduce forming a group ) . If callable then the result of a call is used . unconditional_init : tells whether the first call initializes the aggregation value OR there is a condition for that
def __init__(
        self,
        to_call_with_2_args: typing.Union[typing.Callable, InlineExpr],
        *expressions: typing.Tuple[typing.Any, ...],
        initial: typing.Union[_None, typing.Callable, typing.Any] = _none,
        prepare_first: typing.Union[
            _None, typing.Callable, InlineExpr
        ] = _none,
        default: typing.Union[_None, typing.Callable, typing.Any] = _none,
        unconditional_init: bool = False,
        where=None,
    ):
        """
        Args:
          to_call_with_2_args: defines the reduce function/expression
          expressions: args to be passed to `to_call_with_2_args` after the
            aggregation value
          initial: defined the very first item to be passed to
            `to_call_with_2_args` item. If callable, then the result of a call
            is used.
          prepare_first: defines the reduce function/expression to be called
            on the first item to prepare it for subsequent calls of
            `to_call_with_2_args`
          default: defines the value to be returned when there was nothing to
            reduce in a group (e.g. the current reduce operation has filtered
            out some rows, while an adjacent reduce operation has got
            something to reduce, forming a group). If callable, then the result
            of a call is used.
          unconditional_init: tells whether the first call initializes the
            aggregation value OR there is a condition for that
        """
        super().__init__()
        self.where = None if where is None else self.ensure_conversion(where)
        self.to_call_with_2_args = self.ensure_conversion(to_call_with_2_args)
        self.expressions = tuple(
            self.ensure_conversion(expr) for expr in expressions
        )
        if initial is not _none:
            self.initial = (
                self.ensure_conversion(initial).call()
                if callable(initial)
                or isinstance(initial, NaiveConversion)
                and callable(initial.value)
                else self.ensure_conversion(initial)
            )
        if default is not _none:
            self.default = (
                self.ensure_conversion(default).call()
                if callable(default)
                or isinstance(default, NaiveConversion)
                and callable(default.value)
                else self.ensure_conversion(default)
            )

        if prepare_first is not _none:
            self.prepare_first = self.ensure_conversion(prepare_first)

        if not hasattr(self, "initial") and not hasattr(self, "default"):
            raise ValueError("both initial and default are none")
        if not hasattr(self, "initial") and not hasattr(self, "prepare_first"):
            raise ValueError("both initial and prepare_first are none")
        self.unconditional_init = unconditional_init
def __init__ ( self , to_call_with_2_args : typing . Union [ typing . Callable , InlineExpr ] , * expressions : typing . Tuple [ typing . Any , ... ] , initial : typing . Union [ _None , typing . Callable , typing . Any ] = _none , prepare_first : typing . Union [ _None , typing . Callable , InlineExpr ] = _none , default : typing . Union [ _None , typing . Callable , typing . Any ] = _none , unconditional_init : bool = False , where = None , ) : super ( ) . __init__ ( ) self . where = None if where is None else self . ensure_conversion ( where ) self . to_call_with_2_args = self . ensure_conversion ( to_call_with_2_args ) self . expressions = tuple ( self . ensure_conversion ( expr ) for expr in expressions ) if initial is not _none : self . initial = ( self . ensure_conversion ( initial ) . call ( ) if callable ( initial ) or isinstance ( initial , NaiveConversion ) and callable ( initial . value ) else self . ensure_conversion ( initial ) ) if default is not _none : self . default = ( self . ensure_conversion ( default ) . call ( ) if callable ( default ) or isinstance ( default , NaiveConversion ) and callable ( default . value ) else self . ensure_conversion ( default ) ) if prepare_first is not _none : self . prepare_first = self . ensure_conversion ( prepare_first ) if not hasattr ( self , "initial" ) and not hasattr ( self , "default" ) : raise ValueError ( "both initial and default are none" ) if not hasattr ( self , "initial" ) and not hasattr ( self , "prepare_first" ) : raise ValueError ( "both initial and prepare_first are none" ) self . unconditional_init = unconditional_init