def expected_error_message(display_mode, cut_coords):
    """Return the expected error message depending on display_mode and
    cut_coords. Used in test_invalid_cut_coords_with_display_mode.
    """
    if (display_mode == 'ortho'
            or (display_mode == 'tiled' and cut_coords == 2)):
        return (f"The input given for display_mode='{display_mode}' needs to "
                "be a list of 3d world coordinates.")
    return "The number cut_coords passed does not match the display_mode"