<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_healthchecks(self):
 """ Runs all registered healthchecks and returns a list of HealthcheckResponse. """

        if not self._registry_loaded:
            self.load_healthchecks()

        def get_healthcheck_name(hc):
            if hasattr(hc, 'name'):
                return hc.name
            return hc.__name__

        responses = []
        for healthcheck in self._registry:
            try:
                if inspect.isclass(healthcheck):
                    healthcheck = healthcheck()
                response = healthcheck()
                if isinstance(response, bool):
                    response = HealthcheckResponse(
                        name=get_healthcheck_name(healthcheck),
                        status=response,
                    )
            except Exception as e:
                response = HealthcheckResponse(
                    name=get_healthcheck_name(healthcheck),
                    status=False,
                    exception=str(e),
                    exception_class=e.__class__.__name__,
                )
            responses.append(response)
        return responses