Implement a get_portal_by_id function to find portals in PortalManager.