code: def __init__(self, size, potentials, semiring):
      c = torch.zeros(
          *((semiring.size(),) + size),
          dtype=potentials.dtype,
          device=potentials.device,
      )
      c[:] = semiring.zero.view((semiring.size(),) + len(size) * (1,))
  
      self.data = c
      self.grad = self.data.detach().clone().fill_(0.0)
  
file_path: pytorch-struct/torch_struct/helpers.py
imports: import torch
  import math
  from .semirings import LogSemiring
label_desc: Use image node_id 1 to create a new Chart object  with example: obj = Chart(size, potentials, semiring)