<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _initialize(self):
 """Initialize collector worker thread, Log path will be checked first. Records in DB backend will be cleared. """

        if not os.path.exists(self._logdir):
            raise CollectorError("Log directory %s not exists" % self._logdir)

        self.logger.info("Collector started, taking %s as parent directory"
                         "for all job logs." % self._logdir)

        # clear old records
        JobRecord.objects.filter().delete()
        TrialRecord.objects.filter().delete()
        ResultRecord.objects.filter().delete()