def METHOD_NAME(self, system_assigned=None, user_assigned=None):
    target_identity_type = models_20220301preview.ManagedIdentityType.NONE
    if system_assigned and user_assigned:
        target_identity_type = models_20220301preview.ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED
    elif system_assigned:
        target_identity_type = models_20220301preview.ManagedIdentityType.SYSTEM_ASSIGNED
    elif user_assigned:
        target_identity_type = models_20220301preview.ManagedIdentityType.USER_ASSIGNED
    return target_identity_type