def multiply(*fields, n):
    """
    Multiply ``n`` to the given fields in the document.
    """
    def transform(doc):
        for field in fields:
            doc = doc[field]
        doc *= n

    return transform