<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_data_filelist(self, start_path, attr_name, conn, file_exts=[], dir_filter=set()):
 ''' does a directory search for data files ''' def filter_path(filter_terms, dir_path):
 """ sees if any of the terms are present in the path if so returns True args: filter_terms(list):
 terms to check dir_path: the path of the directory """

            if filter_terms.intersection(set(dir_path.split(os.path.sep))):
                return True
            else:
                return False

        data_obj = {}
        files_dict = {}
        latest_mod = 0
        dir_filter = set(dir_filter)
        for root, dirnames, filenames in os.walk(start_path):
            if not dir_filter or filter_path(dir_filter, root):
                if file_exts:
                    filenames = [x for x in filenames
                                 if x.split('.')[-1].lower() in file_exts]
                files_dict[root] = filenames
                for def_file in filenames:
                    file_mod = os.path.getmtime(os.path.join(root,def_file))
                    if file_mod > latest_mod:
                        latest_mod = file_mod
        data_obj['latest_mod'] = latest_mod
        data_obj['files'] = files_dict
        json_mod = 0
        cache_path = os.path.join(CFG.CACHE_DATA_PATH, attr_name)
        if cache_path:
            for root, dirnames, filenames in os.walk(cache_path):
                for json_file in filenames:
                    file_mod = os.path.getmtime(os.path.join(root,json_file))
                    if file_mod > json_mod:
                        json_mod = file_mod
        data_obj['last_json_mod'] = json_mod
        data_obj['conn'] = conn
        data_obj['cache_path'] = cache_path
        self.datafile_obj[attr_name] = data_obj