def METHOD_NAME(curve):
    """Convert a Rhino curve to a COMPAS ellipse.
    Parameters
    ----------
    curve: :rhino:`Rhino.Geometry.Curve`
    Returns
    -------
    :class:`~compas.geometry.Ellipse`
    Raises
    ------
    ConversionError
        If the curve cannot be converted to an ellipse.
    """
    result, ellipse = curve.TryGetEllipse()
    if not result:
        raise ConversionError("The curve cannot be converted to an ellipse.")
    return ellipse_to_compas(ellipse)