def task_type(inputs, include_calc_type=True):
    """
    Determines the task_type

    Args:
        inputs (dict): inputs dict with an incar, kpoints, potcar, and poscar dictionaries
        include_calc_type (bool): whether to include calculation type
            in task_type such as HSE, GGA, SCAN, etc.
    """
    calc_type = ''
    incar = inputs.get('incar', {})
    if include_calc_type:
        if incar.get('LHFCALC', False):
            calc_type += 'HSE '
        elif incar.get('METAGGA', '') == 'SCAN':
            calc_type += 'SCAN '
        elif incar.get('LDAU', False):
            calc_type += 'GGA+U '
        else:
            calc_type += 'GGA '
    if incar.get('ICHARG', 0) > 10:
        if len(list(filter(None, inputs.get('kpoints', {}).get('labels', [])))
            ) > 0:
            return calc_type + 'NSCF Line'
        else:
            return calc_type + 'NSCF Uniform'
    elif incar.get('LEPSILON', False):
        return calc_type + 'Static Dielectric'
    elif incar.get('LCHIMAG', False):
        return calc_type + 'NMR Chemical Shielding'
    elif incar.get('LEFG', False):
        return calc_type + 'NMR Electric Field Gradient'
    elif incar.get('NSW', 1) == 0:
        return calc_type + 'Static'
    elif incar.get('ISIF', 2) == 3 and incar.get('IBRION', 0) > 0:
        return calc_type + 'Structure Optimization'
    elif incar.get('ISIF', 3) == 2 and incar.get('IBRION', 0) > 0:
        return calc_type + 'Deformation'
    return ''
