def METHOD_NAME(docstring, reducer):
    note1 = """
    The {} function will return zero for nodes with no incoming messages.""".format(
        reducer
    )
    note2 = """
    This is implemented by replacing all {} values to zero.
    """.format(
        "infinity" if reducer == "min" else "negative infinity"
    )
    docstring = docstring + note1
    if reducer in ("min", "max"):
        docstring = docstring + note2
    return docstring