def METHOD_NAME(
    min_version: Optional[str] = _ONNX_MIN_VERSION,
    max_version: Optional[str] = None,
    raise_on_error: bool = True,
) -> bool:
    """
    Check that the onnx package is installed.
    If raise_on_error, will raise an ImportError if it is not installed or
    the required version range, if set, is not installed.
    If not raise_on_error, will return True if installed with required version
    and False otherwise.
    :param min_version: The minimum version for onnx that it must be greater than
        or equal to, if unset will require no minimum version
    :type min_version: str
    :param max_version: The maximum version for onnx that it must be less than
        or equal to, if unset will require no maximum version.
    :type max_version: str
    :param raise_on_error: True to raise any issues such as not installed,
        minimum version, or maximum version as ImportError. False to return the result.
    :type raise_on_error: bool
    :return: If raise_on_error, will return False if onnx is not installed
        or the version is outside the accepted bounds and True if everything is correct.
    :rtype: bool
    """
    if onnx_err is not None:
        if raise_on_error:
            raise onnx_err
        return False
    return check_version("onnx", min_version, max_version, raise_on_error)