def METHOD_NAME(x, y, kappa=0, gamma1=0, gamma2=0, omega=0):
    """This function applies a distortion matrix to a vector (x, y) and returns (x',
    y') as follows:
    .. math::
        \\begin{pmatrix}
        x'
        y'
        \\end{pmatrix}
        =
        \\begin{pmatrix}
        1 - \\kappa - \\gamma_1 & -\\gamma_2 + \\omega
        -\\gamma_2 - \\omega & 1 - \\kappa + \\gamma_1
        \\end{pmatrix}
        \\begin{pmatrix}
        x
        y
        \\end{pmatrix}
    :param x: x-component of the vector to which the distortion matrix is applied
    :param y: y-component of the vector to which the distortion matrix is applied
    :param kappa: the convergence
    :param gamma1: the first shear component
    :param gamma2: the second shear component
    :param omega: the rotation
    :return: the distorted vector
    """
    x_ = (1 - kappa - gamma1) * x + (-gamma2 + omega) * y
    y_ = (1 - kappa + gamma1) * y - (gamma2 + omega) * x
    return x_, y_