class_docstr: Dimension allocator for internal use by :class:`plate`.
  There is a single global instance.
  
  Note that dimensions are indexed from the right, e.g. -1, -2.
docstr: Free a dimension.
docstr_tok: ["Free","a","dimension","."]
code: def free(self, name: str, dim: int) -> None:
      """
      Free a dimension.
      """
      free_idx = -1 - dim  # stack index to free
      assert self._stack[free_idx] == name
      self._stack[free_idx] = None
      while self._stack and self._stack[-1] is None:
          self._stack.pop()
  
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 3 for calling the _DimAllocator obj's underlying member method code with example usage: obj.free(name, dim) without return types