def get_host_assigned_roles(self):
    hosts = self.get_hosts()
    return {h['id']: h['role'] for h in hosts}
def get_host_assigned_roles(self):
    hosts = self.get_hosts()
    return {h['id']: h['role'] for h in hosts}