def METHOD_NAME(self, x, y, e1, e2, center_x, center_y):
    """Get the distance from the center of Sersic, accounting for orientation and
    axis ratio :param x:
    :param y:
    :param e1: eccentricity
    :param e2: eccentricity
    :param center_x: center x of sersic
    :param center_y: center y of sersic
    """
    if self._sersic_major_axis:
        phi_G, q = param_util.ellipticity2phi_q(e1, e2)
        x_shift = x - center_x
        y_shift = y - center_y
        cos_phi = np.cos(phi_G)
        sin_phi = np.sin(phi_G)
        xt1 = cos_phi * x_shift + sin_phi * y_shift
        xt2 = -sin_phi * x_shift + cos_phi * y_shift
        xt2difq2 = xt2 / (q * q)
        r = np.sqrt(xt1 * xt1 + xt2 * xt2difq2)
    else:
        x_, y_ = param_util.transform_e1e2_product_average(
            x, y, e1, e2, center_x, center_y
        )
        r = np.sqrt(x_**2 + y_**2)
    return r