def format_user_results(user: dict):
    """
    Formats and truncates the user result from the Slack API

    Args:
        user: The user response retrieved from the Slack API
    Returns:
        Formatted and truncated version of the result which is context safe.
    """
    return {
        'name': user.get('name'),
        'id': user.get('id'),
        'profile': {
            'email': user.get('profile', {}).get('email', ''),
            'real_name': user.get('profile', {}).get('real_name', ''),
            'display_name': user.get('profile', {}).get('display_name', ''),
        }
    }