code: def _setoption(wmod, arg):
      """
      Copy of the warning._setoption function but does not escape arguments.
      """
      parts = arg.split(":")
      if len(parts) > 5:
          raise wmod._OptionError(
              "too many fields (max 5): %r" % (arg,)
          )
      while len(parts) < 5:
          parts.append("")
      action, message, category, module, lineno = [
          s.strip() for s in parts
      ]
      action = wmod._getaction(action)
      category = wmod._getcategory(category)
      if lineno:
          try:
              lineno = int(lineno)
              if lineno < 0:
                  raise ValueError
          except (ValueError, OverflowError):
              raise wmod._OptionError("invalid lineno %r" % (lineno,))
      else:
          lineno = 0
      wmod.filterwarnings(action, message, category, module, lineno)
  
file_path: catboost/contrib/python/pytest/py2/_pytest/warnings.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import warnings
  from contextlib import contextmanager
  import pytest
  from _pytest import compat
label_desc: Use image node_id 1 for calling a global function with example usage: _setoption(wmod, arg) without return types