(self, name)
Returns the `Container` instance associated with the given name.
Returns the `Container` instance associated with the given name.
Returns the Container instance associated with the given name .
def get_container_by_name(self, name):
        """ Returns the `Container` instance associated with the given name. """
        containers_dict = {c.name: c for c in self.containers}
        if name in containers_dict:
            return containers_dict[name]

        # No containers exist for the considered name.
        raise ProjectError(
            'The container with the name "{name}" was not '
            'found for this project.'.format(name=name))
def get_container_by_name ( self , name ) : containers_dict = { c . name : c for c in self . containers } if name in containers_dict : return containers_dict [ name ] # No containers exist for the considered name. raise ProjectError ( 'The container with the name "{name}" was not ' 'found for this project.' . format ( name = name ) )