code: def test_round_trip_optional_nones(self):
      data = DataClassWithOptionals(
          optional_str=None,
          optional_int=None,
          optional_bool=None,
          optional_list=None,
          optional_dict=None,
          optional_child=None,
      )
      data_json = to_json(data)
      self.assertEqual("{}", data_json)
      self.assertEqual(
          data, from_json(data_json, DataClassWithOptionals)
      )
  
imports: import unittest
  import json
  from dataclasses import dataclass
  from typing import Dict, List, Optional
  from helm.benchmark.augmentations.dialect_perturbation import DialectPerturbation
  from helm.benchmark.augmentations.extra_space_perturbation import ExtraSpacePerturbation
  from helm.benchmark.augmentations.filler_words_perturbation import FillerWordsPerturbation
  from helm.benchmark.augmentations.gender_perturbation import GenderPerturbation
  from helm.benchmark.augmentations.misspelling_perturbation import MisspellingPerturbation
  from helm.benchmark.augmentations.person_name_perturbation import PersonNamePerturbation
  from helm.benchmark.augmentations.space_perturbation import SpacePerturbation
  from helm.benchmark.augmentations.synonym_perturbation import SynonymPerturbation
  from helm.benchmark.augmentations.typos_perturbation import TyposPerturbation
  from helm.benchmark.augmentations.perturbation_description import PerturbationDescription
  from helm.common.codec import from_json, to_json
label_desc: Use image node_id 2 for calling the TestJsonCodec obj's underlying member method code with example usage: obj.test_round_trip_optional_nones() without return types