<commit_before>"""
    This file is responsible for centralizing the service conventions used in nautilus.
"""

# local imports
from .models import get_model_string

def model_service_name(model):
    ''' the name of a service that manages a model '''
    return get_model_string(model)


def connection_service_name(model1, model2):
    ''' the name of a service that manages the connection between two models '''

    # figure out the model string
    model1_name = get_model_string(model1) if not isinstance(model1, str) else model1
    model2_name = get_model_string(model2) if not isinstance(model2, str) else model2

    # sort the names alphabetically
    [name1, name2] = sorted([model1_name, model2_name])

    # combine the two names into the connection name
    return "{}_{}_connection".format(name1, name2)<commit_msg>connection service convetion now handles any number of services<commit_after>"""
    This file is responsible for centralizing the service conventions used in nautilus.
"""

# local imports
from .models import get_model_string

def model_service_name(model):
    ''' the name of a service that manages a model '''
    return get_model_string(model)


def connection_service_name(*args):
    ''' the name of a service that manages the connection between services '''

    # the list of services to connect
    services = []

    # for each service to connect
    for service in args:
        # if the service was passed as a string
        if isinstance(service, str):
            # add it to the list
            services.append(service)
        # otherwise the serivice was not a string
        else:
            services.append(get_model_string(model))

    # combine the two names into the connection name
    return "{}_connection".format('_'.join(sorted(services)))
{'fraction_non_alphanumeric': 0.07606885063853415, 'fraction_numerical': 0.008883953359244865, 'mean_word_length': 3.5969387755102042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5302838', 'n_tokens_mistral': 488, 'n_tokens_neox': 470, 'n_words': 191}