Synthesis of a highly porous carbon material with magnetic properties