code: def pytest_cmdline_parse(
      pluginmanager: "PytestPluginManager", args: List[str]
  ) -> Optional["Config"]:
      """Return an initialized :class:`~pytest.Config`, parsing the specified args.
  
      Stops at first non-None result, see :ref:`firstresult`.
  
      .. note::
          This hook will only be called for plugin classes passed to the
          ``plugins`` arg when using `pytest.main`_ to perform an in-process
          test run.
  
      :param pluginmanager: The pytest plugin manager.
      :param args: List of arguments passed on the command line.
      :returns: A pytest config object.
      """
  
imports: from pathlib import Path
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Mapping
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from typing import TYPE_CHECKING
  from typing import Union
  from pluggy import HookspecMarker
  from _pytest.deprecated import WARNING_CMDLINE_PREPARSE_HOOK
label_desc: Use image node_id 5 for calling a global function with example usage: pytest_cmdline_parse(pluginmanager, args) without return types