def inject_constants(row, **constants):
    """Inject constant values into the data.

    Constants are taken from the following places (in order of override):

        * The processor's pipeline parameters
        * The datapackage's `constant_fields_injector` property
        * Each resource's `constant_fields_injector` property

    If no constants are found, the processor does nothing.

    :param row: one row of data as `dict`
    :param constants: a `dict` of constants

    :returns row: the new row

    """

    stats = '_pass'

    for key, value in constants.items():
        if value is not None:
            row[key] = value

    return row, stats