def transform_Reduce(self, expr):
    assert len(expr.args) > 0, "Can't have Reduce without any arguments %s" % expr 
    new_args = self.transform_args(expr.args, flat = True)
    arg_types = get_types(new_args)
    axis = self.transform_if_expr(expr.axis)

    map_fn = self.transform_fn(expr.fn if expr.fn else untyped_identity_function) 
    combine_fn = self.transform_fn(expr.combine)
   
    # if there aren't any arrays, just treat this as a function call
    if all(isinstance(t, ScalarT) for t in arg_types):
      scalar_result = self.invoke(map_fn, new_args)
      cast_t = self.invoke_type(combine_fn, [scalar_result, scalar_result])
      return self.cast(scalar_result, cast_t)
    
    if self.is_none(expr.init):
      init = none 
    else: 
      init = self.transform_expr(expr.init)
    
    axes = self.normalize_axes(new_args, axis)
    result_type, typed_map_fn, typed_combine_fn = \
      specialize_Reduce(map_fn.type,
                        combine_fn.type,
                        arg_types, 
                        axes, 
                        init.type)

    typed_map_closure = make_typed_closure (map_fn, typed_map_fn)
    typed_combine_closure = make_typed_closure(combine_fn, typed_combine_fn)
    # if we encounter init = 0 for a Reduce which produces an array
    # then need to broadcast to get an initial value of the appropriate rank 
    if init.type.__class__ <= NoneT and \
       init.type != result_type and \
       array_type.rank(init.type) < array_type.rank(result_type):
      assert len(new_args) == 1, "Can't have more than one arg in " % expr  
      arg = new_args[0]
      first_elt = self.slice_along_axis(arg, axis, zero_i64)
      first_combine = specialize(combine_fn, (init.type, first_elt.type))
      
      first_combine_closure = make_typed_closure(combine_fn, first_combine)
      init = self.call(first_combine_closure, (init, first_elt))
      slice_rest = syntax.Slice(start = one_i64, stop = none, step = one_i64, 
                                   type = array_type.SliceT(Int64, NoneType, Int64))
      rest = self.slice_along_axis(arg, axis, slice_rest)
      new_args = (rest,)  

    return syntax.Reduce(fn = typed_map_closure,
                         combine = typed_combine_closure,
                         args = new_args,
                         axis = axis,
                         type = result_type,
                         init = init)
dataset/ETHPy150Open iskandr/parakeet/parakeet/type_inference/type_inference.py/TypeInference.transform_Reduce/operator `is not` -> `<=`