import torch


def get_spacer_tensor(template: torch.Tensor, length: int) -> torch.Tensor:
    """Get a tensor of zeros."""
    shape = template.shape[:-1] + (length,)
    return torch.zeros(
        shape,
        dtype=torch.float32,
        device=template.device,
    )