docs: def to_curve_spline(obj):
      '''
      to_curve_spline(obj) obj if obj is a curve spline and otherwise attempts to coerce obj into a
        curve spline, raising an error if it cannot.
      '''
      if   is_curve_spline(obj):            return obj
      elif is_tuple(obj) and len(obj) == 2: (crds,opts) = obj
      else:                                 (crds,opts) = (obj,{})
      if pimms.is_matrix(crds) or is_curve_spline(crds): crds = [crds]
      spls = [c for c in crds if is_curve_spline(c)]
      opts = dict(opts)
      if 'weights' not in opts and len(spls) == len(crds):
          if all(c.weights is not None for c in crds):
              opts['weights'] = np.concatenate([c.weights for c in crds])
      if 'order' not in opts and len(spls) > 0:
          opts['order'] = np.min([c.order for c in spls])
      if 'smoothing' not in opts and len(spls) > 0:
          sm = set([c.smoothing for c in spls])
          if len(sm) == 1: opts['smoothing'] = list(sm)[0]
          else: opts['smoothing'] = None
      crds = [x.crds if is_curve_spline(crds) else np.asarray(x) for x in crds]
      crds = [x if x.shape[0] == 2 else x.T for x in crds]
      crds = np.hstack(crds)
      return curve_spline(crds, **opts)