code: def find_spans(degree, knot_vector, num_ctrlpts, knots, func=find_span_linear):
      
      spans = []
      for knot in knots:
          spans.append(func(degree, knot_vector, num_ctrlpts, knot))
      return spans
docs: Finds spans of a list of knots over the knot vector.
  
      :param degree: degree, :math:`p`
      :type degree: int
      :param knot_vector: knot vector, :math:`U`
      :type knot_vector: list, tuple
      :param num_ctrlpts: number of control points, :math:`n + 1`
      :type num_ctrlpts: int
      :param knots: list of knots or parameters
      :type knots: list, tuple
      :param func: function for span finding, e.g. linear or binary search
      :return: list of spans
      :rtype: list