docstr: Partitions t0 and t1 into n_samples intervals.
  
  Args:
      ts: [batch_size, *shape, n_samples, 1]
  
  Return:
  
      lower: [batch_size, *shape, n_samples, 1] upper: [batch_size, *shape, n_samples, 1] delta: [batch_size,
      *shape, n_samples, 1]
  
  where
      ts \in [lower, upper] deltas = upper - lower
docstr_tok: ["Partitions","t0","and","t1","into","n_samples","intervals",".","Args",":","ts",":","[","batch_size",",","*","shape",",","n_samples",",","1","]","Return",":","lower",":","[","batch_size",",","*","shape",",","n_samples",",","1","]","upper",":","[","batch_size",",","*","shape",",","n_samples",",","1","]","delta",":","[","batch_size",",","*","shape",",","n_samples",",","1","]","where","ts","\\in","[","lower",",","upper","]","deltas","=","upper","-","lower"]
code: def partition(self, ts):
      """
      Partitions t0 and t1 into n_samples intervals.
  
      Args:
          ts: [batch_size, *shape, n_samples, 1]
  
      Return:
  
          lower: [batch_size, *shape, n_samples, 1] upper: [batch_size, *shape, n_samples, 1] delta: [batch_size,
          *shape, n_samples, 1]
  
      where
          ts \\in [lower, upper] deltas = upper - lower
      """
  
      mids = (ts[..., 1:, :] + ts[..., :-1, :]) * 0.5
      lower = torch.cat([self.t0[..., None, :], mids], dim=-2)
      upper = torch.cat([mids, self.t1[..., None, :]], dim=-2)
      delta = upper - lower
      assert lower.shape == upper.shape == delta.shape == ts.shape
      return lower, upper, delta
  
imports: import math
  from dataclasses import dataclass
  from typing import Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
  from ...configuration_utils import ConfigMixin, register_to_config
  from ...models import ModelMixin
  from ...utils import BaseOutput
  from .camera import create_pan_cameras
label_desc: Use image node_id 2 for calling the VolumeRange obj's underlying member method code with example usage: obj.partition(ts) and returns: lower,  upper,  delta