def version(self) -> Union[int, str]:
        """Get the experiment version.

        Returns:
            The experiment version if specified else the next version.

        """
        if self._version is None:
            self._version = self._get_next_version()
        return self._version
Get the experiment version.

        Returns:
            The experiment version if specified else the next version.

        
src/lightning/fabric/loggers/tensorboard.py