<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _specialize_curve(nodes, start, end):
 """Specialize a curve to a re-parameterization .. note:: This assumes the curve is degree 1 or greater but doesn't check. .. note:: There is also a Fortran implementation of this function, which will be used if it can be built. Args: nodes (numpy.ndarray):
 Control points for a curve. start (float):
 The start point of the interval we are specializing to. end (float):
 The end point of the interval we are specializing to. Returns: numpy.ndarray: The control points for the specialized curve. """

    # NOTE: There is no corresponding "enable", but the disable only applies
    #       in this lexical scope.
    # pylint: disable=too-many-locals
    _, num_nodes = np.shape(nodes)
    # Uses start-->0, end-->1 to represent the specialization used.
    weights = ((1.0 - start, start), (1.0 - end, end))
    partial_vals = {
        (0,): de_casteljau_one_round(nodes, *weights[0]),
        (1,): de_casteljau_one_round(nodes, *weights[1]),
    }
    for _ in six.moves.xrange(num_nodes - 2, 0, -1):
        new_partial = {}
        for key, sub_nodes in six.iteritems(partial_vals):
            # Our keys are ascending so we increment from the last value.
            for next_id in six.moves.xrange(key[-1], 1 + 1):
                new_key = key + (next_id,)
                new_partial[new_key] = de_casteljau_one_round(
                    sub_nodes, *weights[next_id]
                )
        partial_vals = new_partial
    result = np.empty(nodes.shape, order="F")
    for index in six.moves.xrange(num_nodes):
        key = (0,) * (num_nodes - index - 1) + (1,) * index
        result[:, [index]] = partial_vals[key]
    return result