code: def register(self, service):
          
          if service.name not in self.services.keys():
              logger.debug('StackInABox({0}): Registering Service {1}'
                           .format(self.__id, service.name))
              regex = '^/{0}/'.format(service.name)
              self.services[service.name] = [
                  re.compile(regex),
                  service
              ]
              service.base_url = StackInABox.__get_service_url(self.base_url,
                                                               service.name)
              logger.debug('StackInABox({0}): Service {1} has url {2}'
                           .format(self.__id, service.name, service.base_url))
          else:
              raise ServiceAlreadyRegisteredError(
                  'Service {0} is already registered'.format(service.name))
docs: Add a service to the thread's StackInABox instance.
  
          :param service: StackInABoxService instance to add to the test
  
          :returns: None
          :raises: ServiceAlreadyRegisteredError if the service already exists