code: def _convert_default_value(self, default):
          
  
          if default is None:
              return None
  
          if isinstance(default, str):
              if self.special_type == 'string':
                  return default.encode('utf-8') + b'\0'
  
              raise DataError("You can only pass a unicode string if you are declaring a string type config variable", default=default)
  
          if isinstance(default, (bytes, bytearray)):
              if self.special_type == 'string' and isinstance(default, bytes):
                  default += b'\0'
  
              return default
  
          if isinstance(default, int):
              default = [default]
  
          format_string = "<" + (self.base_type*len(default))
          return struct.pack(format_string, *default)
docs: Convert the passed default value to binary.
  
          The default value (if passed) may be specified as either a `bytes`
          object or a python int or list of ints.  If an int or list of ints is
          passed, it is converted to binary.  Otherwise, the raw binary data is
          used.
  
          If you pass a bytes object with python_type as True, do not null terminate
          it, an additional null termination will be added.
  
          Passing a unicode string is only allowed if as_string is True and it
          will be encoded as utf-8 and null terminated for use as a default value.