def resample_2_epi(T1, epi, aparc_aseg=None):
    """
        Resample images to epi resolution
    """
    import os
    import shutil
    from p3.utility import get_basename
    cwd = os.getcwd()
    epi = epi[0]
    out_file = os.path.join(cwd, '{}_funcres.nii.gz'.format(get_basename(T1)))
    os.system('3dresample -rmode Li -master {} -prefix {} -inset {}'.format
        (epi, out_file, T1))
    T1_epi = out_file
    if aparc_aseg:
        out_file = os.path.join(cwd, '{}_funcres.nii.gz'.format(
            get_basename(aparc_aseg)))
        os.system('3dresample -rmode NN -master {} -prefix {} -inset {}'.
            format(epi, out_file, aparc_aseg))
        aparc_aseg_epi = out_file
    else:
        aparc_aseg_epi = ''
    return T1_epi, aparc_aseg_epi
