code: def pytest_addoption(parser):
      """Add command line option to pytest."""
  
      if hasattr(parser, "add_argument"):
          # parser is a argparse.Parser object
          addoption = parser.add_argument
      else:
          # parser is a pytest.config.Parser object
          addoption = parser.addoption
  
      # The options are the three arguments every device takes
      addoption(
          "--device",
          action="store",
          default=None,
          help="The device to test.",
      )
      addoption(
          "--shots",
          action="store",
          default=None,
          help="Number of shots to use in stochastic mode.",
      )
      addoption(
          "--analytic",
          action="store",
          default=None,
          help="Whether to run the tests in stochastic or exact mode.",
      )
      addoption(
          "--skip-ops",
          action="store_true",
          default=False,
          help="Skip tests that use unsupported device operations.",
      )
  
      addoption(
          "--device-kwargs",
          dest="device_kwargs",
          action=StoreDictKeyPair,
          default={},
          nargs="+",
          metavar="KEY=VAL",
          help="Additional device kwargs.",
      )
  
file_path: pennylane/pennylane/devices/tests/conftest.py
imports: import argparse
  import os
  import numpy
  import pytest
  from _pytest.runner import pytest_runtest_makereport
  import pennylane
label_desc: Use image node_id 7 for calling a global function with example usage: pytest_addoption(parser) without return types