code: def latch(self):
          if len(self.current_value) == 0:
              raise DataError("There was no data in a config variable during latching", name=self.name)
          remaining = len(self.current_value) % self.unit_size
          if remaining > 0:
              self.current_value += bytearray(remaining)
          if self.special_type == 'string':
              if self.current_value[-1] != 0:
                  raise DataError("String type was specified by data did not end with a null byte", data=self.current_value, name=self.name)
              return bytes(self.current_value[:-1]).decode('utf-8')
          fmt_code = "<" + (self.base_type * (len(self.current_value) // self.unit_size))
          data = struct.unpack(fmt_code, self.current_value)
          if self.variable:
              data = list(data)
          else:
              data = data[0]
              if self.special_type == 'bool':
                  data = bool(data)
          return data