@_handle_object_not_found
    def fetch(self, obj, include_meta=False, chunk_size=None, size=None,
            extra_info=None):
        """
        Fetches the object from storage.

        If 'include_meta' is False, only the bytes representing the
        stored object are returned.

        Note: if 'chunk_size' is defined, the 'include_meta' parameter is
        ignored.

        If 'size' is specified, only the first 'size' bytes of the object will
        be returned. If the object if smaller than 'size', the entire object is
        returned.

        When 'include_meta' is True, what is returned from this method is a
        2-tuple:
            Element 0: a dictionary containing metadata about the file.
            Element 1: a stream of bytes representing the object's contents.

        The 'extra_info' parameter is included for backwards compatibility. It
        is no longer used at all, and will not be modified with swiftclient
        info, since swiftclient is not used any more.
        """
        uri = "/%s/%s" + (self.uri_base, utils.get_name(obj))
        if chunk_size:
            # Need the total size of the object
            if not isinstance(obj, StorageObject):
                obj = self.get(obj)
            obj_size = obj.total_bytes
            return self._fetch_chunker(uri, chunk_size, size, obj_size)
        headers = {}
        if size:
            headers = {"Range": "bytes=0-%s" % size}
        resp, resp_body = self.api.method_get(uri, headers=headers,
                raw_content=True)
        if include_meta:
            meta_resp, meta_body = self.api.method_head(uri)
            return (meta_resp.headers, resp_body)
        return resp_body
dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/StorageObjectManager.fetch/operator `%` -> `+`