code: def deselect_by_keyword(items, config):
      keywordexpr = config.option.keyword.lstrip()
      if not keywordexpr:
          return
  
      if keywordexpr.startswith("-"):
          keywordexpr = "not " + keywordexpr[1:]
      selectuntil = False
      if keywordexpr[-1:] == ":":
          selectuntil = True
          keywordexpr = keywordexpr[:-1]
  
      remaining = []
      deselected = []
      for colitem in items:
          if keywordexpr and not matchkeyword(colitem, keywordexpr):
              deselected.append(colitem)
          else:
              if selectuntil:
                  keywordexpr = None
              remaining.append(colitem)
  
      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 4 for calling a global function with example usage: deselect_by_keyword(items, config) without return types