code: def dict_contents(self, use_dict=None, as_class=dict):
          
          # make/extend the dictionary of content
          if use_dict is None:
              use_dict = as_class()
  
          # save the content
          use_dict.__setitem__('dnet', self.rtDNET)
          use_dict.__setitem__('port_id', self.rtPortID)
          use_dict.__setitem__('port_info', self.rtPortInfo)
  
          # return what we built/updated
          return use_dict
docs: Return the contents of an object as a dict.