<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gaussian_kernel(data_shape, sigma, norm='max'):
 r"""Gaussian kernel This method produces a Gaussian kerenal of a specified size and dispersion Parameters data_shape : tuple Desiered shape of the kernel sigma : float Standard deviation of the kernel norm : str {'max', 'sum', 'none'}, optional Normalisation of the kerenl (options are 'max', 'sum' or 'none') Returns ------- np.ndarray kernel Examples -------- array([[ 0.36787944, 0.60653066, 0.36787944], [ 0.60653066, 1. , 0.60653066], [ 0.36787944, 0.60653066, 0.36787944]]) array([[ 0.07511361, 0.1238414 , 0.07511361], [ 0.1238414 , 0.20417996, 0.1238414 ], [ 0.07511361, 0.1238414 , 0.07511361]]) """


    if not import_astropy:  # pragma: no cover
        raise ImportError('Astropy package not found.')

    if norm not in ('max', 'sum', 'none'):
        raise ValueError('Invalid norm, options are "max", "sum" or "none".')

    kernel = np.array(Gaussian2DKernel(sigma, x_size=data_shape[1],
                      y_size=data_shape[0]))

    if norm == 'max':
        return kernel / np.max(kernel)

    elif norm == 'sum':
        return kernel / np.sum(kernel)

    elif norm == 'none':
        return kernel