code: def _reconstruct_record(self, record_object):
          
          ''' a helper method for reconstructing record fields from record object '''
          
          record_details = {}
          current_details = record_details
          for key, value in self.model.keyMap.items():
              record_key = key[1:]
              if record_key:
                  record_value = getattr(record_object, record_key, None)
                  if record_value != None:
                      record_segments = record_key.split('.')
                      for i in range(len(record_segments)):
                          segment = record_segments[i]
                          if i + 1 < len(record_segments):
                              if segment not in record_details.keys():
                                  current_details[segment] = {}
                              current_details = current_details[segment]
                          else:
                              if isinstance(record_value, bytes):
                                  current_details[segment] = pickle.loads(record_value)
                              else:
                                  current_details[segment] = record_value
                      current_details = record_details
                      
          return record_detailf _reconstruct_record(self, record_object):
          
          ''' a helper method for reconstructing record fields from record object '''
          
          record_details = {}
          current_details = record_details
          for key, value in self.model.keyMap.items():
              record_key = key[1:]
              if record_key:
                  record_value = getattr(record_object, record_key, None)
                  if record_value != None:
                      record_segments = record_key.split('.')
                      for i in range(len(record_segments)):
                          segment = record_segments[i]
                          if i + 1 < len(record_segments):
                              if segment not in record_details.keys():
                                  current_details[segment] = {}
                              current_details = current_details[segment]
                          else:
                              if isinstance(record_value, bytes):
                                  current_details[segment] = pickle.loads(record_value)
                              else:
                                  current_details[segment] = record_value
                      current_details = record_details
                      
          return record_details
docs: a helper method for reconstructing record fields from record object