<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_hosting_device_reachable(self, hosting_device):
 """Check the hosting device which hosts this resource is reachable. If the resource is not reachable, it is added to the backlog. * heartbeat revision We want to enqueue all hosting-devices into the backlog for monitoring purposes adds key/value pairs to hd (aka hosting_device dictionary) _is_pingable : if it returns true, hd['hd_state']='Active' _is_pingable : if it returns false, hd['hd_state']='Unknown' :param hosting_device : dict of the hosting device :returns: True if device is reachable, else None """

        ret_val = False

        hd = hosting_device
        hd_id = hosting_device['id']
        hd_mgmt_ip = hosting_device['management_ip_address']

        dead_hd_list = self.get_dead_hosting_devices_info()
        if hd_id in dead_hd_list:
            LOG.debug("Hosting device: %(hd_id)s@%(ip)s is already marked as"
                      " Dead. It is assigned as non-reachable",
                      {'hd_id': hd_id, 'ip': hd_mgmt_ip})
            return False

        # Modifying the 'created_at' to a date time object if it is not
        if not isinstance(hd['created_at'], datetime.datetime):
            hd['created_at'] = datetime.datetime.strptime(hd['created_at'],
                                                          '%Y-%m-%d %H:%M:%S')

        if _is_pingable(hd_mgmt_ip):
            LOG.debug("Hosting device: %(hd_id)s@%(ip)s is reachable.",
                      {'hd_id': hd_id, 'ip': hd_mgmt_ip})
            hd['hd_state'] = cc.HD_ACTIVE
            ret_val = True
        else:
            LOG.debug("Hosting device: %(hd_id)s@%(ip)s is NOT reachable.",
                      {'hd_id': hd_id, 'ip': hd_mgmt_ip})
            hd['hd_state'] = cc.HD_NOT_RESPONDING
            ret_val = False

        if self.enable_heartbeat is True or ret_val is False:
            self.backlog_hosting_device(hd)

        return ret_val