<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetUsernameByIdentifier( self, user_identifier, session_identifier=CURRENT_SESSION):
 """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. """

    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 ''