<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def HandleAccounts(self, result):
 """Called when there are changes to the contents of the metadata server. Args: result: json, the deserialized contents of the metadata server. """

    self.logger.debug('Checking for changes to user accounts.')
    configured_users = self.utils.GetConfiguredUsers()
    enable_oslogin = self._GetEnableOsLoginValue(result)
    enable_two_factor = self._GetEnableTwoFactorValue(result)
    if enable_oslogin:
      desired_users = {}
      self.oslogin.UpdateOsLogin(True, two_factor_desired=enable_two_factor)
    else:
      desired_users = self._GetAccountsData(result)
      self.oslogin.UpdateOsLogin(False)
    remove_users = sorted(set(configured_users) - set(desired_users.keys()))
    self._UpdateUsers(desired_users)
    self._RemoveUsers(remove_users)
    self.utils.SetConfiguredUsers(desired_users.keys())