class_docstr: Abstract base class for Hidden Markov Models.
  
  The purpose of this class is to handle duration logic for homogeneous HMMs.
  
  :param int duration: Optional size of the time axis ``event_shape[0]``.
      This is required when sampling from homogeneous HMMs whose parameters
      are not expanded along the time axis.
class_docstr_tok: ["Abstract","base","class","for","Hidden","Markov","Models",".","The","purpose","of","this","class","is","to","handle","duration","logic","for","homogeneous","HMMs",".",":","param","int","duration",":","Optional","size","of","the","time","axis","``","event_shape","[","0","]","``",".","This","is","required","when","sampling","from","homogeneous","HMMs","whose","parameters","are","not","expanded","along","the","time","axis","."]
docstr: Returns the size of the time axis, or None if unknown.
docstr_tok: ["Returns","the","size","of","the","time","axis",",","or","None","if","unknown","."]
code: def duration(self):
      """
      Returns the size of the time axis, or None if unknown.
      """
      return self._duration
  
imports: import torch
  import torch.nn.functional
  from pyro.ops.gamma_gaussian import GammaGaussian, gamma_and_mvn_to_gamma_gaussian, gamma_gaussian_tensordot, matrix_and_mvn_to_gamma_gaussian
  from pyro.ops.gaussian import Gaussian, gaussian_tensordot, matrix_and_mvn_to_gaussian, mvn_to_gaussian, sequential_gaussian_filter_sample, sequential_gaussian_tensordot
  from pyro.ops.indexing import Vindex
  from pyro.ops.special import safe_log
  from pyro.ops.tensor_utils import cholesky_solve, safe_cholesky
  from .None import constraints
  from .torch import Categorical, Gamma, Independent, MultivariateNormal
  from .torch_distribution import TorchDistribution
  from .util import broadcast_shape, torch_jit_script_if_tracing
label_desc: Use image node_id 2 for calling the HiddenMarkovModel obj's underlying member method code with example usage: obj.duration() and returns: self