code: def set_value(repo_directory, key, value, strict=True):
      
      if value is None:
          raise ValueError('Argument "value" must not be None.')
  
      # Read values and do nothing if not making any changes
      config = read_config(repo_directory)
      old = config.get(key)
      if old == value:
          return old
  
      # Check schema
      if strict and old is not None and not isinstance(old, type(value)):
          raise ConfigSchemaError('Expected config variable %s to be type %s, got %s'
              % (repr(key), repr(type(value)), repr(type(old))))
  
      # Set new value and save results
      config[key] = value
      write_config(repo_directory, config)
      return old
docs: Sets the value of a particular key in the config file. This has no effect when setting to the same value.