code: def update_configuration(configuration):
      
      for key, val in REQUIRED_SETTINGS.items():
          if val in ["$username", "$groupname"]:
              val = get_username()
  
          configuration = conf_writer.add_or_update(configuration, key, val)
  
      return configuration
docs: Set all configuration specified in :attr:`REQUIRED_SETTINGS`.
  
      Args:
          configuration (str): Configuration file content.
  
      Returns:
          str: Updated configuration.