def METHOD_NAME(svc_def, textfsm_dir):
    """Return the dict of fields with types given a service definition file"""
    field_set = set()
    defn_list = svc_def.get('apply', [])
    for entry in defn_list:
        nfn = defn_list[entry].get('normalize', None)
        if nfn:
            plist = re.split('''/(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', nfn)
            for elem in plist:
                try:
                    nfn_fld_list = ast.literal_eval(elem)
                    nfn_flds = [
                        re.match(r'\s*(?:add\(|div\(|mul\(|sub\()*(\w+)',
                                 fld.split(':')[1]).group(1)
                        for fld in nfn_fld_list if isinstance(fld, str)
                    ]
                    field_set.update(nfn_flds)
                except (ValueError, SyntaxError):
                    words = elem.split(':')
                    if len(words) > 1:
                        field_set.add(re.match(r'\s*(\w+)',
                                               words[1]).group(1))
        else:
            nfn = defn_list[entry].get('textfsm', None)
            if nfn:
                # pylint: disable=redefined-outer-name
                with open(textfsm_dir + '/' + nfn, 'r') as f:
                    lines = f.readlines()
                for line in lines:
                    if line.startswith('Value'):
                        g = re.match(r'Value\s+(\w+)\s*(\w*)', line).groups()
                        if g[-1]:
                            fldname = g[-1]
                        else:
                            fldname = g[0]
                        field_set.add(fldname)
    return field_set