docstr: Convert raw raggedness tensors into funsor.tensor.Tensors
docstr_tok: ["Convert","raw","raggedness","tensors","into","funsor.tensor.Tensors"]
code: def initialize_raggedness_masks(self):
      """
      Convert raw raggedness tensors into funsor.tensor.Tensors
      """
      batch_inputs = OrderedDict(
          [
              ("i", Bint[self.config["sizes"]["individual"]]),
              ("g", Bint[self.config["sizes"]["group"]]),
              ("t", Bint[self.config["sizes"]["timesteps"]]),
          ]
      )
  
      raggedness_masks = {}
      for name in ("individual", "timestep"):
          data = self.config[name]["mask"]
          if len(data.shape) < len(batch_inputs):
              while len(data.shape) < len(batch_inputs):
                  data = data.unsqueeze(-1)
              data = data.expand(
                  tuple(v.dtype for v in batch_inputs.values())
              )
          data = data.to(self.config["observations"]["step"].dtype)
          raggedness_masks[name] = Tensor(
              data[..., : self.config["sizes"]["timesteps"]],
              batch_inputs,
          )
  
      self.raggedness_masks = raggedness_masks
      return self.raggedness_masks
  
imports: from collections import OrderedDict
  import pyro
  import torch
  from torch.distributions import constraints
  import funsor.ops
  import funsor.torch.distributions
  from funsor.domains import Bint, Reals
  from funsor.tensor import Tensor
  from funsor.terms import Stack, Variable, to_funsor
label_desc: Use image node_id 4 for calling the Model obj's underlying member method code with example usage: obj.initialize_raggedness_masks() and returns: self