@staticmethod<EOL><INDENT>def from_entity(entity, self_user_id):<DEDENT>
user_id = UserID(chat_id=entity.id.chat_id,<EOL>gaia_id=entity.id.gaia_id)<EOL>return User(user_id, entity.properties.display_name,<EOL>entity.properties.first_name,<EOL>entity.properties.photo_url,<EOL>entity.properties.email,<EOL>(self_user_id == user_id) or (self_user_id is None))<EOL>
Construct user from ``Entity`` message.

        Args:
            entity: ``Entity`` message.
            self_user_id (~hangups.user.UserID or None): The ID of the current
                user. If ``None``, assume ``entity`` is the current user.

        Returns:
            :class:`~hangups.user.User` object.