def local_weight(
    point: np.array,
    training_data_x: np.array,
    training_data_y: np.array,
    bandwidth: float,
) -> np.array:
    weight = weighted_matrix(point, training_data_x, bandwidth)
    w = np.linalg.inv(training_data_x.T @ (weight @ training_data_x)) @ (
        training_data_x.T @ weight @ training_data_y.T
    )

    return w