class_docstr: Implements the external storage interface using the ray storage API.
class_docstr_tok: ["Implements","the","external","storage","interface","using","the","ray","storage","API","."]
code: def restore_spilled_objects(
      self,
      object_refs: List[ObjectRef],
      url_with_offset_list: List[str],
  ):
      total = 0
      for i in range(len(object_refs)):
          object_ref = object_refs[i]
          url_with_offset = url_with_offset_list[i].decode()
          # Retrieve the information needed.
          parsed_result = parse_url_with_offset(url_with_offset)
          base_url = parsed_result.base_url
          offset = parsed_result.offset
          # Read a part of the file and recover the object.
          with self._fs.open_input_file(base_url) as f:
              f.seek(offset)
              address_len = int.from_bytes(
                  f.read(8), byteorder="little"
              )
              metadata_len = int.from_bytes(
                  f.read(8), byteorder="little"
              )
              buf_len = int.from_bytes(f.read(8), byteorder="little")
              self._size_check(
                  address_len, metadata_len, buf_len, parsed_result.size
              )
              total += buf_len
              owner_address = f.read(address_len)
              metadata = f.read(metadata_len)
              # read remaining data to our buffer
              self._put_object_to_store(
                  metadata, buf_len, f, object_ref, owner_address
              )
      return total
  
imports: import abc
  import logging
  import os
  import random
  import shutil
  import time
  import urllib
  import uuid
  from collections import namedtuple
  from typing import IO, List, Optional, Tuple
  import ray
  from ray._private.ray_constants import DEFAULT_OBJECT_PREFIX
  from ray._raylet import ObjectRef
label_desc: Use image node_id 3 for calling the ExternalStorageRayStorageImpl obj's underlying member method code with example usage: obj.restore_spilled_objects(object_refs, url_with_offset_list) and returns: total