<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_service_dependencies(service, servicedependencies):
 """ Registers a service dependencies. :param service: The service to register :type service: :param servicedependencies: The servicedependencies container :type servicedependencies: :return: None """

        # We explode service_dependencies into Servicedependency
        # We just create serviceDep with goods values (as STRING!),
        # the link pass will be done after
        sdeps = [d.strip() for d in getattr(service, "service_dependencies", [])]
        # %2=0 are for hosts, !=0 are for service_description
        i = 0
        hname = ''
        for elt in sdeps:
            if i % 2 == 0:  # host
                hname = elt
            else:  # description
                desc = elt
                # we can register it (service) (depend on) -> (hname, desc)
                # If we do not have enough data for service, it'service no use
                if hasattr(service, 'service_description') and hasattr(service, 'host_name'):
                    if hname == '':
                        hname = service.host_name
                    servicedependencies.add_service_dependency(
                        service.host_name, service.service_description, hname, desc)
            i += 1