code: def optional_int(argument: str) -> int | None:
      """
      Check for an integer argument or None value; raise ``ValueError`` if not.
      """
      if argument is None:
          return None
      else:
          value = int(argument)
          if value < 0:
              msg = "negative value; must be positive or zero"
              raise ValueError(msg)
          return value
  
imports: from __future__ import annotations
  import re
  from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast
  from docutils import nodes
  from docutils.parsers.rst import directives, roles
  from sphinx import addnodes
  from sphinx.addnodes import desc_signature
  from sphinx.util import docutils
  from sphinx.util.docfields import DocFieldTransformer, Field, TypedField
  from sphinx.util.docutils import SphinxDirective
  from sphinx.util.nodes import nested_parse_with_titles
  from sphinx.util.typing import OptionSpec
label_desc: Use image node_id 1 for calling a global function with example usage: optional_int(argument) and returns: None, value