def build_page(rex, kwargs):
    target_node = kwargs.get('node') or kwargs.get('project')
    target_id = target_node._id
    data = {
        'target_id': target_id,
    }
    data.update(kwargs)
    data.update(request.args.to_dict())
    try:
        return rex.format(**data)
    except KeyError:
        return None
Build page key from format pattern and request data.
dataset/ETHPy150Open CenterForOpenScience/osf.io/framework/analytics/__init__.py/build_page