<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_n_smooth(smooth_input, smooth_time, initial_value, order, subs, subscript_dict):
 """Constructs stock and flow chains that implement the calculation of a smoothing function. Parameters smooth_input: <string> Reference to the model component that is the input to the smoothing function smooth_time: <string> Can be a number (in string format) or a reference to another model element which will calculate the delay. This is calculated throughout the simulation at runtime. initial_value: <string> This is used to initialize the stocks that are present in the delay. We initialize the stocks with equal values so that the outflow in the first timestep is equal to this value. order: string The number of stocks in the delay pipeline. As we construct the delays at build time, this must be an integer and cannot be calculated from other model components. Anything else will yield a ValueError. subs: list of strings List of strings of subscript indices that correspond to the list of expressions, and collectively define the shape of the output See `builder.add_flaux` for more info Returns ------- reference: basestring reference to the smooth object `__call__` method, which will return the output of the smooth process new_structure: list list of element construction dictionaries for the builder to assemble """


    stateful = {
        'py_name': utils.make_python_identifier('_smooth_%s_%s_%s_%s' % (smooth_input,
                                                                        smooth_time,
                                                                        initial_value,
                                                                        order))[0],
        'real_name': 'Smooth of %s' % smooth_input,
        'doc': 'Smooth time: %s \n Smooth initial value %s \n Smooth order %s' % (
            smooth_time, initial_value, order),
        'py_expr': 'functions.Smooth(lambda: %s, lambda: %s, lambda: %s, lambda: %s)' % (
            smooth_input, smooth_time, initial_value, order),
        'unit': 'None',
        'lims': 'None',
        'eqn': 'None',
        'subs': '',
        'kind': 'stateful',
        'arguments': ''
    }

    return "%s()" % stateful['py_name'], [stateful]