class_docstr: Container which holds the data for a shard as a Tensor and also
  the associated metadata for that shard.
  
  Args:
      tensor(torch.Tensor): Local tensor for the shard.
      metadata(:class `torch.distributed._shard.sharded_tensor.ShardMetadata`):
          The metadata for the shard, including offsets, lengths and device placement.
code: def __post_init__(self):
      # verification between local tensor and metadata
      if list(self.tensor.size()) != self.metadata.shard_sizes:
          raise ValueError(
              "Shard tensor size does not match with metadata.shard_lengths! "
              f"Found shard tensor size: {list(self.tensor.size())}, "
              f"metadata.shard_lengths: {self.metadata.shard_sizes}, "
          )
      placement_device = self.metadata.placement
      if (
          placement_device is not None
          and placement_device.device() != self.tensor.device
      ):
          raise ValueError(
              f"Local shard tensor device does not match with local Shard's placement! "
              f"Found local shard tensor device: {self.tensor.device}, "
              f"local shard metadata placement device: {placement_device.device()}"
          )
  
file_path: pytorch/torch/distributed/_shard/sharded_tensor/shard.py
imports: from dataclasses import dataclass
  from typing import List
  import torch
  from torch.distributed._shard.metadata import ShardMetadata
  from torch.distributed.remote_device import _remote_device
label_desc: Use image node_id 1 for calling the Shard obj's underlying member method code with example usage: obj.__post_init__() without return types