Two-way Node Popularity Model for Directed and Bipartite Networks (Journal of Machine Learning Research, 2026)