def get_object_by_name(self, object_name, download=False):
        """Get an object stored by its name.

        Does not download the content of the object by default.
        :param object_name: Name of the object to create
        :param download: If True download also the object content
        """
        if download:
            call = 'get_object'
        else :
            call = 'head_object'
        res = self._manager._swift_call(self.region.name,
                                        call,
                                        self.name,
                                        object_name)

        try:
            return self._en_dict_to_obj(object_name, res[0], data=res[1])
        except __HOLE__:
            return self._en_dict_to_obj(object_name, res)
dataset/ETHPy150Open runabove/python-runabove/runabove/storage.py/Container.get_object_by_name