<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def randn_ktensor(shape, rank, norm=None, random_state=None):
 """ Generates a random N-way tensor with rank R, where the entries are drawn from the standard normal distribution. Parameters shape : tuple shape of the tensor rank : integer rank of the tensor norm : float or None, optional (defaults: None) If not None, the factor matrices are rescaled so that the Frobenius norm of the returned tensor is equal to ``norm``. random_state : integer, RandomState instance or None, optional (default ``None``) If integer, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random. Returns ------- N-way tensor with rank R. Example ------- """


    # Check input.
    rns = _check_random_state(random_state)

    # Draw low-rank factor matrices with i.i.d. Gaussian elements.
    factors = KTensor([rns.standard_normal((i, rank)) for i in shape])
    return _rescale_tensor(factors, norm)