def invert_y_and_z_axis(input_matrix_or_vector):
    """Invert the y and z axis of a given matrix or vector.

    Many SfM / MVS libraries use coordinate systems that differ from Blender's
    coordinate system in the y and the z coordinate. This function inverts the
    y and the z coordinates in the corresponding matrix / vector entries, which
    is equivalent to a rotation by 180 degree around the x axis.
    """
    output_matrix_or_vector = input_matrix_or_vector.copy()
    output_matrix_or_vector[1] = -output_matrix_or_vector[1]
    output_matrix_or_vector[2] = -output_matrix_or_vector[2]
    return output_matrix_or_vector