import itertools


def _parse_vhosts(services_to_configure: dict) -> set:
    """
    Parse MQ vhosts specified in the requested configuration
    :param services_to_configure: service mapping parsed from service_mappings.yml
    :returns: set of vhosts to be created
    """
    default_vhosts = ["/neon_testing"]
    vhosts = [service.get("mq", service).get("mq_vhosts", [])
              for service in services_to_configure.values()]
    vhosts.append(default_vhosts)
    return set(itertools.chain.from_iterable(vhosts))