def _url_val(val, key, obj, **kwargs):
    if isinstance(val, URLFor):
        return val.serialize(key, obj, **kwargs)
    else:
        return val
Function applied by `HyperlinksField` to get the correct value in the
dataset/ETHPy150Open marshmallow-code/flask-marshmallow/flask_marshmallow/fields.py/_url_val