def METHOD_NAME(data, background1D, r_bins, p_ellipse, center=None):
    """
    Gets 2D polar elliptical background from linear 1D background
    Parameters
    ----------
    data : ndarray
        the data for which to find the polar eliptical background,
        usually a diffraction pattern
    background1D : ndarray
        a vector representing the radial elliptical background
    r_bins : ndarray
        a vector of the elliptically transformed radius associated with
        background1D
    p_ellipse : 5-tuple
        the ellipse parameters (qx0,qy0,a,b,theta)
    center : 2-tuple or None
        if None, the center point from `p_ellipse` is used. Otherwise,
        the center point in `p_ellipse` is ignored, and this argument
        is used as (qx0,qy0) instead.
    Returns
    -------
    ndarray
        2D polar elliptical median background image
    """
    assert (
        r_bins.shape == background1D.shape
    ), "1D background and r_bins must be same length"
    # Prepare ellipse params
    qx0, qy0, a, b, theta = p_ellipse
    if center is not None:
        qx0, qy0 = center
    # Define centered 2D cartesian coordinate system
    yc, xc = np.meshgrid(
        np.arange(0, data.shape[1]) - qy0, np.arange(0, data.shape[0]) - qx0
    )
    # Calculate the semimajor axis distance for each point in the 2D array
    r = np.sqrt(
        ((xc * np.cos(theta) + yc * np.sin(theta)) ** 2)
        + (((xc * np.sin(theta) - yc * np.cos(theta)) ** 2) / ((b / a) ** 2))
    )
    # Create a 2D eliptical background using linear interpolation
    f = interp1d(r_bins, background1D, fill_value="extrapolate")
    background2D = f(r)
    return background2D