code: def __init__(self, _dict=dict, preserve=False):
      from toml.decoder import CommentValue
  
      super(TomlPreserveCommentEncoder, self).__init__(_dict, preserve)
      self.dump_funcs[CommentValue] = lambda v: v.dump(self.dump_value)
  
imports: import datetime
  import re
  import sys
  from decimal import Decimal
  from toml.decoder import InlineTableDict
label_desc: Use image node_id 1 to create a new TomlPreserveCommentEncoder object from inherited base classes: TomlEncoder with example: obj = TomlPreserveCommentEncoder(_dict, preserve)