<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bspline_to_nurbs(obj):
 """ Converts non-rational parametric shapes to rational ones. :param obj: B-Spline shape :type obj: BSpline.Curve, BSpline.Surface or BSpline.Volume :return: NURBS shape :rtype: NURBS.Curve, NURBS.Surface or NURBS.Volume :raises: TypeError """

    # B-Spline -> NURBS
    if isinstance(obj, BSpline.Curve):
        return _convert.convert_curve(obj, NURBS)
    elif isinstance(obj, BSpline.Surface):
        return _convert.convert_surface(obj, NURBS)
    elif isinstance(obj, BSpline.Volume):
        return _convert.convert_volume(obj, NURBS)
    else:
        raise TypeError("Input must be an instance of B-Spline curve, surface or volume")