code: def bspline_to_nurbs(obj):
      
      # 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")
docs: 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