def METHOD_NAME(scope):
    path = None
    routes = scope["app"].routes
    for route in routes:
        match, _ = route.matches(scope)
        if match == Match.FULL:
            path = route.path
            break
        elif match == Match.PARTIAL and path is None:
            path = route.path
    return path