code: def GetUsernameByIdentifier(
        self, user_identifier, session_identifier=CURRENT_SESSION):
      
      user_accounts = self._user_accounts.get(session_identifier, {})
      user_account = user_accounts.get(user_identifier, None)
      if not user_account:
        return ''
  
      return user_account.username or ''
docs: Retrieves the username based on an user identifier.
  
      Args:
        user_identifier (str): user identifier, either a UID or SID.
        session_identifier (Optional[str])): session identifier, where
            CURRENT_SESSION represents the active session.
  
      Returns:
        str: username.