def dmp_nest(f, l, K):
 if (not isinstance(f, list)):
  return dmp_ground(f, l)
 for i in range(l):
  f = [f]
 return f

def dmp_nest ( f , l , K ) : if ( not isinstance ( f , list ) ) : return dmp_ground ( f , l ) for i in range ( l ) : f = [ f ] return f
return a multivariate value nested l-levels .