Added set_metadata for networks.