<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def container_by_name(self, name):
 """ Returns container with given name """

        if not name:
            return None

        # docker prepends a '/' to container names in the container dict
        name = '/'+name
        return next((container for container in self.containers(all=True)
                     if name in container['Names']), None)