Nitrogen-Doping Induced Self-Assembly of Graphene Nanoribbon-Based Two-Dimensional and Three-Dimensional Metamaterials.