<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cmdscale_fast(D, ndim):
 """Fast CMDS using random SVD Parameters D : array-like, input data [n_samples, n_dimensions] ndim : int, number of dimensions in which to embed `D` Returns ------- Y : array-like, embedded data [n_sample, ndim] """

    tasklogger.log_debug("Performing classic MDS on {} of shape {}...".format(
        type(D).__name__, D.shape))
    D = D**2
    D = D - D.mean(axis=0)[None, :]
    D = D - D.mean(axis=1)[:, None]
    pca = PCA(n_components=ndim, svd_solver='randomized')
    Y = pca.fit_transform(D)
    return Y