code: def deselect_by_mark(items, config):
      matchexpr = config.option.markexpr
      if not matchexpr:
          return
  
      remaining = []
      deselected = []
      for item in items:
          if matchmark(item, matchexpr):
              remaining.append(item)
          else:
              deselected.append(item)
  
      if deselected:
          config.hook.pytest_deselected(items=deselected)
          items[:] = remaining
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from .legacy import matchkeyword
  from .legacy import matchmark
  from .structures import EMPTY_PARAMETERSET_OPTION
  from .structures import get_empty_parameterset_mark
  from .structures import Mark
  from .structures import MARK_GEN
  from .structures import MarkDecorator
  from .structures import MarkGenerator
  from .structures import ParameterSet
  from _pytest.config import UsageError
label_desc: Use image node_id 5 for calling a global function with example usage: deselect_by_mark(items, config) without return types