code: def pystan_version():
      """Check PyStan version.
  
      Returns
      -------
      int
          Major version number
  
      """
      try:
          import pystan  # pylint: disable=import-error
  
          version = int(pystan.__version__[0])
      except ImportError:
          try:
              import stan  # pylint: disable=import-error
  
              version = int(stan.__version__[0])
          except ImportError:
              version = None
      return version
  
imports: import gzip
  import importlib
  import logging
  import os
  import sys
  from typing import Any, Dict, List, Optional, Tuple, Union
  import cloudpickle
  import numpy
  import pytest
  from _pytest.outcomes import Skipped
  from packaging.version import Version
  from ..data import InferenceData, from_dict
label_desc: Use image node_id 24 for calling a global function with example usage: pystan_version() and returns: version