code: def size(self, size: int):
      from . import DimensionBindError
  
      if self._size is None:
          self._size = size
          self._vmap_level = _vmap_increment_nesting(
              size, "same"
          )  # noqa: F821
          self._vmap_stack = len(_vmap_levels)
          _vmap_levels.append(LevelInfo(self._vmap_level))
  
      elif self._size != size:
          raise DimensionBindError(
              f"Dim '{self}' previously bound to a dimension of size {self._size} cannot bind to a dimension of size {size}"
          )
  
file_path: pytorch/functorch/dim/dim.py
imports: import dis
  import inspect
  from dataclasses import dataclass
  from typing import Union
  from .None import DimList
label_desc: Use image node_id 4 for calling the Dim obj's underlying member method code with example usage: obj.size(size) without return types