class_docstr: Wrap one shard of the model, make it possible to load parameters on the
  fly for the FW and BW pass on the given device.
code: def to(self, device: torch.device) -> "ModelShard":  # type: ignore
      # Make sure that the lookahead and lookback shards are not captured by this call
      self.model_shard.to(device)
      return self
  
imports: from builtins import isinstance
  import functools
  import logging
  from typing import Any, List, Tuple
  import torch
  from torch import nn
label_desc: Use image node_id 3 for calling the ModelShard obj's underlying member method code with example usage: obj.to(device) and returns: self