def METHOD_NAME(menu: List[Dict[str, Any]]) -> None:
    for item in menu:
        if item.get('endpoint'):
            item['url'] = url_for(item.get('endpoint', ''))
        item['is_external'] = cast(str, item.get('url', '')).startswith('http') and '://pennydreadfulmagic.com/' not in item['url']
        METHOD_NAME(item.get('submenu', []))