<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_and_report(self):
 """ Target function for the metric reporting thread. This is a simple loop to collect and report entity data every 1 second. """

        logger.debug("Metric reporting thread is now alive")

        def metric_work():
            self.process()
            if self.agent.is_timed_out():
                logger.warn("Host agent offline for >1 min.  Going to sit in a corner...")
                self.agent.reset()
                return False
            return True

        every(1, metric_work, "Metrics Collection")