class_docstr: Dimension allocator for internal use by :func:`~pyro.poutine.markov`.
  There is a single global instance.
  
  Note that dimensions are indexed from the right, e.g. -1, -2.
  Note that ids are simply nonnegative integers here.
docstr: Set the first available dim, which should be to the left of all
  :class:`plate` dimensions, e.g. ``-1 - max_plate_nesting``. This should
  be called once per program. In SVI this should be called only once per
  (guide,model) pair.
docstr_tok: ["Set","the","first","available","dim",",","which","should","be","to","the","left","of","all",":","class",":","`","plate","`","dimensions",",","e.g",".","``","-1","-","max_plate_nesting","``",".","This","should","be","called","once","per","program",".","In","SVI","this","should","be","called","only","once","per","(","guide",",","model",")","pair","."]
code: def set_first_available_dim(self, first_available_dim: int) -> None:
      """
      Set the first available dim, which should be to the left of all
      :class:`plate` dimensions, e.g. ``-1 - max_plate_nesting``. This should
      be called once per program. In SVI this should be called only once per
      (guide,model) pair.
      """
      assert first_available_dim < 0, first_available_dim
      self.next_available_dim = first_available_dim
      self.next_available_id = 0
      self.dim_to_id: Dict[int, int] = {}
  
imports: import functools
  from typing import TYPE_CHECKING, Callable, Dict, Generic, List, Optional, Set, Tuple, TypeVar, Union, overload
  import torch
  from typing_extensions import Literal, ParamSpec, TypedDict
  from pyro.params.param_store import _MODULE_NAMESPACE_DIVIDER, ParamStoreDict
label_desc: Use image node_id 1 for calling the _EnumAllocator obj's underlying member method code with example usage: obj.set_first_available_dim(first_available_dim) without return types