def create_from_discriminator_value(parse_node: ParseNode) -> IdentitySet:
        """
        Creates a new instance of the appropriate class based on discriminator value
        param parse_node: The parse node to use to read the discriminator value and create the object
        Returns: IdentitySet
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        try:
            child_node = parse_node.get_child_node("@odata.type")
            mapping_value = child_node.get_str_value() if child_node else None
        except AttributeError:
            mapping_value = None
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.aiInteractionMentionedIdentitySet".casefold():
            from .ai_interaction_mentioned_identity_set import AiInteractionMentionedIdentitySet

            return AiInteractionMentionedIdentitySet()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.chatMessageFromIdentitySet".casefold():
            from .chat_message_from_identity_set import ChatMessageFromIdentitySet

            return ChatMessageFromIdentitySet()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.chatMessageMentionedIdentitySet".casefold():
            from .chat_message_mentioned_identity_set import ChatMessageMentionedIdentitySet

            return ChatMessageMentionedIdentitySet()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.chatMessageReactionIdentitySet".casefold():
            from .chat_message_reaction_identity_set import ChatMessageReactionIdentitySet

            return ChatMessageReactionIdentitySet()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsIdentitySet".casefold():
            from .communications_identity_set import CommunicationsIdentitySet

            return CommunicationsIdentitySet()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.sharePointIdentitySet".casefold():
            from .share_point_identity_set import SharePointIdentitySet

            return SharePointIdentitySet()
        return IdentitySet()

        Creates a new instance of the appropriate class based on discriminator value
        param parse_node: The parse node to use to read the discriminator value and create the object
        Returns: IdentitySet
        
msgraph/generated/models/identity_set.py