<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update(self):
 """Reload Taskwarrior files if the mtime is newer"""

        update = False

        with self._lock:
            for fname in ['pending.data', 'completed.data']:
                data_file = join(self._data_location, fname)
                if exists(data_file):
                    mtime = getmtime(data_file)
                    if mtime > self._mtime:
                        self._mtime = mtime
                        update = True

            if update:
                self._tasks = {}
                tasklist = loads(run(['task', 'rc.verbose=nothing', 'rc.hooks=off', 'rc.data.location={self._data_location}'.format(**locals()), 'export'], stdout=PIPE).stdout.decode('utf-8'))
                for task in tasklist:
                    project = task['project'] if 'project' in task else 'unaffiliated'
                    if project not in self._tasks:
                        self._tasks[project] = {}
                    self._tasks[project][task['uuid']] = task