def verify_pack_version(pack_metadata):
    """
    Verify that the pack works with the currently running StackStorm version.
    """
    pack_name = pack_metadata.get("name", None)
    required_stackstorm_version = pack_metadata.get("stackstorm_version", None)
    supported_python_versions = pack_metadata.get("python_versions", None)

    # If stackstorm_version attribute is specified, verify that the pack works with currently
    # running version of StackStorm
    if required_stackstorm_version:
        if not complex_semver_match(
            CURRENT_STACKSTORM_VERSION, required_stackstorm_version
        ):
            msg = (
                'Pack "%s" requires StackStorm "%s", but current version is "%s". '
                'You can override this restriction by providing the "force" flag, but '
                "the pack is not guaranteed to work."
                % (pack_name, required_stackstorm_version, CURRENT_STACKSTORM_VERSION)
            )
            raise ValueError(msg)

    if supported_python_versions:
        if set(supported_python_versions) == set(["2"]) and (not six.PY2):
            msg = (
                'Pack "%s" requires Python 2.x, but current Python version is "%s". '
                'You can override this restriction by providing the "force" flag, but '
                "the pack is not guaranteed to work."
                % (pack_name, CURRENT_PYTHON_VERSION)
            )
            raise ValueError(msg)
        elif set(supported_python_versions) == set(["3"]) and (not six.PY3):
            msg = (
                'Pack "%s" requires Python 3.x, but current Python version is "%s". '
                'You can override this restriction by providing the "force" flag, but '
                "the pack is not guaranteed to work."
                % (pack_name, CURRENT_PYTHON_VERSION)
            )
            raise ValueError(msg)
        else:
            # Pack support Python 2.x and 3.x so no check is needed, or
            # supported version matches ST2 version
            pass

    return True

    Verify that the pack works with the currently running StackStorm version.
    
st2common/st2common/util/pack_management.py