<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def manage_host_check_result_brok(self, b):
 # pylint: disable=too-many-branches

        host_name = b.data.get('host_name', None)
        if not host_name:
            return
        logger.debug("host check result: %s", host_name)

        # If host initial status brok has not been received, ignore ...
        if host_name not in self.hosts_cache and not self.ignore_unknown:
            logger.warning("received host check result for an unknown host: %s", host_name)
            return

        # Decode received metrics
        metrics = self.get_metrics_from_perfdata('host_check', b.data['perf_data'])
        if not metrics:
            logger.debug("no metrics to send ...")
            return

        # If checks latency is ignored
        if self.ignore_latency_limit >= b.data['latency'] > 0:
            check_time = int(b.data['last_chk']) - int(b.data['latency'])
        else:
            check_time = int(b.data['last_chk'])

        # Custom hosts variables
        hname = sanitize_name(host_name)
        if host_name in self.hosts_cache:
            if self.hosts_cache[host_name].get('_GRAPHITE_GROUP', None):
                hname = ".".join((self.hosts_cache[host_name].get('_GRAPHITE_GROUP'), hname))

            if self.hosts_cache[host_name].get('_GRAPHITE_PRE', None):
                hname = ".".join((self.hosts_cache[host_name].get('_GRAPHITE_PRE'), hname))

        # Graphite data source
        if self.graphite_data_source:
            path = '.'.join((hname, self.graphite_data_source))
            if self.hostcheck:
                path = '.'.join((hname, self.graphite_data_source, self.hostcheck))
        else:
            path = '.'.join((hname, self.hostcheck))

        # Realm as a prefix
        if self.realms_prefix and self.hosts_cache[host_name].get('realm_name', None):
            path = '.'.join((self.hosts_cache[host_name].get('realm_name'), path))

        realm_name = None
        if host_name in self.hosts_cache:
            realm_name = self.hosts_cache[host_name].get('realm_name', None)

        # Send metrics
        self.send_to_tsdb(realm_name, host_name, self.hostcheck, metrics, check_time, path)