def create_from_discriminator_value(parse_node: ParseNode) -> Identity:
        """
        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: Identity
        """
        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.azureCommunicationServicesUserIdentity".casefold():
            from .azure_communication_services_user_identity import AzureCommunicationServicesUserIdentity

            return AzureCommunicationServicesUserIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.callRecords.userIdentity".casefold():
            from .call_records.user_identity import UserIdentity
            from .user_identity import UserIdentity

            return UserIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsApplicationIdentity".casefold():
            from .communications_application_identity import CommunicationsApplicationIdentity

            return CommunicationsApplicationIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsApplicationInstanceIdentity".casefold():
            from .communications_application_instance_identity import CommunicationsApplicationInstanceIdentity

            return CommunicationsApplicationInstanceIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsEncryptedIdentity".casefold():
            from .communications_encrypted_identity import CommunicationsEncryptedIdentity

            return CommunicationsEncryptedIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsGuestIdentity".casefold():
            from .communications_guest_identity import CommunicationsGuestIdentity

            return CommunicationsGuestIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsPhoneIdentity".casefold():
            from .communications_phone_identity import CommunicationsPhoneIdentity

            return CommunicationsPhoneIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.communicationsUserIdentity".casefold():
            from .communications_user_identity import CommunicationsUserIdentity

            return CommunicationsUserIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.emailIdentity".casefold():
            from .email_identity import EmailIdentity

            return EmailIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.initiator".casefold():
            from .initiator import Initiator

            return Initiator()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.provisionedIdentity".casefold():
            from .provisioned_identity import ProvisionedIdentity

            return ProvisionedIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.provisioningServicePrincipal".casefold():
            from .provisioning_service_principal import ProvisioningServicePrincipal

            return ProvisioningServicePrincipal()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.provisioningSystem".casefold():
            from .provisioning_system import ProvisioningSystem

            return ProvisioningSystem()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.servicePrincipalIdentity".casefold():
            from .service_principal_identity import ServicePrincipalIdentity

            return ServicePrincipalIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.sharePointIdentity".casefold():
            from .share_point_identity import SharePointIdentity

            return SharePointIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.teamworkApplicationIdentity".casefold():
            from .teamwork_application_identity import TeamworkApplicationIdentity

            return TeamworkApplicationIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.teamworkConversationIdentity".casefold():
            from .teamwork_conversation_identity import TeamworkConversationIdentity

            return TeamworkConversationIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.teamworkTagIdentity".casefold():
            from .teamwork_tag_identity import TeamworkTagIdentity

            return TeamworkTagIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.teamworkUserIdentity".casefold():
            from .teamwork_user_identity import TeamworkUserIdentity

            return TeamworkUserIdentity()
        if mapping_value and mapping_value.casefold() == "#microsoft.graph.userIdentity".casefold():
            from .call_records.user_identity import UserIdentity
            from .user_identity import UserIdentity

            return UserIdentity()
        return Identity()

        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: Identity
        
msgraph/generated/models/identity.py