def delta(a, b):
    """
    Return change in percent (or None if undefined).

    The delta in percent is rounded to one decimal.
    """
    if a is None or b is None:
        return None
    if a == 0.0 and b == 0.0:
        return 0.0
    assert a != 0.0 and b != 0.0
    return round((b - a) * 1000.0 / a) / 10.0