def get_by_name(self, region, container_name, list_objects=False):
        """Get a container by its name.

        As two containers with the same name can exist in two
        different regions we need to limit the search to one region.
        :param container_name: Name of the container to retrieve
        :raises ResourceNotFoundError: Container does not exist
        """
        try:
            region_name = region.name
        except __HOLE__:
            region_name = region
        res = self._swift_call(region_name,
                               'head_container',
                                container_name)
        return self._en_dict_to_obj(container_name, region_name, res)
dataset/ETHPy150Open runabove/python-runabove/runabove/storage.py/ContainerManager.get_by_name