class_docstr: Move tensor to device.
  
  Parameters
  ----------
  device: torch.device
      Device to move to.
  non_blocking: bool
      Asynchronous if copying from CPU to GPU.
code: def declare_state_and_memory(
      self, previous_state: State
  ) -> Tuple[State, Optional[AllocationQuery]]:
      return replace(
          previous_state, device=self.device
      ), AllocationQuery(
          previous_state.shape,
          dtype=previous_state.dtype,
          device=self.device,
      )
  
imports: import torch
  import numpy
  from typing import Callable, Optional, Tuple
  from ..pipeline.allocation_query import AllocationQuery
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from dataclasses import replace
label_desc: Use image node_id 3 for calling the ToDevice obj's underlying member method code with example usage: obj.declare_state_and_memory(previous_state) and returns: replace,  AllocationQuery