<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def pause(path, service_names=None):
    '''
    Pause running containers in the docker-compose file, service_names is a python
    list, if omitted pause all containers

    path
        Path where the docker-compose file is stored on the server
    service_names
        If specified will pause only the specified services

    CLI Example:

    .. code-block:: bash

        salt myminion dockercompose.pause /path/where/docker-compose/stored
        salt myminion dockercompose.pause /path/where/docker-compose/stored '[janus]'
    '''

    project = __load_project(path)
    debug_ret = {}
    result = {}
    if isinstance(project, dict):
        return project
    else:
        try:
            project.pause(service_names)
            if debug:
                for container in project.containers():
                    if service_names is None or container.get('Name')[1:] in service_names:
                        container.inspect_if_not_inspected()
                        debug_ret[container.get('Name')] = container.inspect()
                        result[container.get('Name')] = 'paused'
        except Exception as inst:
            return __handle_except(inst)
    return __standardize_result(True, 'Pausing containers via docker-compose', result, debug_ret)