code: def remove(self, future):
          
          if self._loop.get_debug():
              logger.debug("Removing %s from the linked list.", future)
          if future.prev is None:
              assert future is self.head
              self.head = future.next
              if self.head is None:
                  self.tail = None
                  if not self.cancelled():
                      self.set_result(None)
              else:
                  self.head.prev = None
          elif future.next is None:
              assert future is self.tail
              self.tail = future.prev
              if self.tail is None:
                  self.head = None
                  if not self.cancelled():
                      self.set_result(None)
              else:
                  self.tail.prev = None
docs: Remove an object from the linked list.
  
          Args:
              future (PlasmaObjectFuture): A PlasmaObjectFuture instance.