<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def new_points( factory: IterationPointFactory, solution, weights: List[List[float]] = None ) -> List[Tuple[np.ndarray, List[float]]]: """Generate approximate set of points Generate set of Pareto optimal solutions projecting from the Pareto optimal solution using weights to determine the direction. Parameters factory: IterationPointFactory with suitable optimization problem solution: Current solution from which new solutions are projected weights: Direction of the projection, if not given generate with :func:random_weights """

    from desdeo.preference.direct import DirectSpecification

    points = []
    nof = factory.optimization_method.optimization_problem.problem.nof_objectives()
    if not weights:
        weights = random_weights(nof, 50 * nof)
    for pref in map(
        lambda w: DirectSpecification(factory.optimization_method, np.array(w)), weights
    ):
        points.append(factory.result(pref, solution))
    return points