'Make tuples mapping service dependencies. Return a list of tuples
and need hosts and service dependencies parameter.'

def load_svc_mapping(self, hosts, svc_dep, verbose=False):

    r = []
    for dep in svc_dep:
        parent_host_name = self.split_and_merge(dep['host_name'])
        try:
            dependent_host_name = self.split_and_merge(dep['dependent_host_name'])
        except KeyError:
            dependent_host_name = parent_host_name
        if verbose:
            print ''
            print 'Service    dependency    host_name', parent_host_name
            print 'Service    dependency    dependent_host_name', dependent_host_name
        dep['service_description'] = self.split_and_merge(dep['service_description'])
        dep['dependent_service_description'] = self.split_and_merge(dep['dependent_service_description'])
        parent_svc_tuples = []
        dependent_svc_tuples = []
        for parent_svc in dep['service_description']:
            parent_svc_tuples += [[('service', ((host[0] + ',') + parent_svc)) for host in hosts if (host_name in host[1])] for host_name in parent_host_name]
        for dependent_svc in dep['dependent_service_description']:
            dependent_svc_tuples += [[('service', ((host[0] + ',') + dependent_svc)) for host in hosts if (host_name in host[1])] for host_name in dependent_host_name]
        dependent_tuples = self.split_and_merge(dependent_svc_tuples, split=False)
        if verbose:
            print 'Parent    service    dependencies    tuples    list', parent_svc_tuples
            print 'Dependent    service    dependencies    tuples    list', dependent_svc_tuples
        for parent_tuples in parent_svc_tuples:
            r.append(self.make_all_dep_tuples(hosts, parent_tuples, dependent_tuples))
    if verbose:
        print ''
        print 'Result:', r
    return r
