human
I wrote the below code

    if ignore_fields:
        def filter_ignore_fields(d, fields):
            for field in fields:
                (key, _, value) = field.partition('.')
                if value:
                    filter_ignore_fields(d[key], [value])
                elif (field in d):
                    d.pop(field)
                else:
                    pass
        value_ = copy(value)
        filter_ignore_fields(value_, ignore_fields)
    else:
        value_ = value
    h = hashlib.sha1()
    json_encoder = app.data.json_encoder_class()
    h.update(dumps(value_, sort_keys=True, default=json_encoder.default).encode('utf-8'))
    return h.hexdigest()

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def document_etag(value, ignore_fields=None):