async def get_by_email(self, email: str) -> Optional[UD]:
    query = self.model.filter(email__iexact=email).first()
    if (self.oauth_account_model is not None):
        query = query.prefetch_related('oauth_accounts')
    user = (await query)
    if (user is None):
        return None
    user_dict = (await user.to_dict())
    return self.user_db_model(**user_dict)
async def get_by_email(self, email: str) -> Optional[UD]:
    query = self.model.filter(email__iexact=email).first()
    if (self.oauth_account_model is not None):
        query = query.prefetch_related('oauth_accounts')
    user = (await query)
    if (user is None):
        return None
    user_dict = (await user.to_dict())
    return self.user_db_model(**user_dict)