code: def __parse_identities(self, stream):
          
  
          for aliases in self.__parse_stream(stream):
              identity = self.__parse_alias(aliases[0])
              uuid = identity.email
  
              uid = self._identities.get(uuid, None)
  
              if not uid:
                  uid = UniqueIdentity(uuid=uuid)
                  identity.uuid = uuid
                  uid.identities.append(identity)
                  self._identities[uuid] = uid
  
                  profile = Profile(uuid=uuid, name=identity.name, email=identity.email,
                                    is_bot=False)
                  uid.profile = profile
  
              # Aliases
              for alias in aliases[1:]:
                  identity = self.__parse_alias(alias, uuid)
                  uid.identities.append(identity)
  
              self._identities[uuid] = uid
docs: Parse identities stream