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

def ps(path):
    '''
    List all running containers and report some information about them

    path
        Path where the docker-compose file is stored on the server

    CLI Example:

    .. code-block:: bash

        salt myminion dockercompose.ps /path/where/docker-compose/stored
    '''

    project = __load_project(path)
    result = {}
    if isinstance(project, dict):
        return project
    else:
        if USE_FILTERCLASS:
            containers = sorted(
                project.containers(None, stopped=True) +
                project.containers(None, OneOffFilter.only),
                key=attrgetter('name'))
        else:
            containers = sorted(
                project.containers(None, stopped=True) +
                project.containers(None, one_off=True),
                key=attrgetter('name'))
        for container in containers:
            command = container.human_readable_command
            if len(command) > 30:
                command = '{0} ...'.format(command[:26])
            result[container.name] = {
                'id': container.id,
                'name': container.name,
                'command': command,
                'state': container.human_readable_state,
                'ports': container.human_readable_ports,
            }
    return __standardize_result(True, 'Listing docker-compose containers', result, None)