class_docstr: torch.Tensor with a variable 0-th dimension, used to describe batched data
class_docstr_tok: ["torch.Tensor","with","a","variable","0-th","dimension",",","used","to","describe","batched","data"]
code: def unpackb(cls, raw: bytes) -> BatchTensorDescriptor:
      obj_dict = MSGPackSerializer.loads(raw)
  
      if obj_dict["dtype"] is not None:
          obj_dict["dtype"] = _str_to_torch_type(
              obj_dict["dtype"], torch.dtype
          )
  
      if obj_dict["layout"] is not None:
          obj_dict["layout"] = _str_to_torch_type(
              obj_dict["layout"], torch.layout
          )
  
      if obj_dict["device_type"] is not None:
          obj_dict["device"] = torch.device(
              obj_dict["device_type"], obj_dict["device_index"]
          )
      else:
          obj_dict["device"] = None
  
      del obj_dict["device_type"], obj_dict["device_index"]
  
      size = obj_dict.pop("size")[1:]
  
      return BatchTensorDescriptor(*size, **obj_dict)
  
imports: from __future__ import annotations
  import warnings
  from dataclasses import asdict, dataclass
  from typing import Tuple
  import numpy
  import torch
  from hivemind.proto.runtime_pb2 import CompressionType
  from hivemind.utils.serializer import MSGPackSerializer
label_desc: Use image node_id 5 for calling the BatchTensorDescriptor obj's underlying member method code with example usage: obj.unpackb(cls, raw) and returns: BatchTensorDescriptor