code: def runtestprotocol(item, log=True, nextitem=None):
      hasrequest = hasattr(item, "_request")
      if hasrequest and not item._request:
          item._initrequest()
      rep = call_and_report(item, "setup", log)
      reports = [rep]
      if rep.passed:
          if item.config.getoption("setupshow", False):
              show_test_item(item)
          if not item.config.getoption("setuponly", False):
              reports.append(call_and_report(item, "call", log))
      reports.append(
          call_and_report(item, "teardown", log, nextitem=nextitem)
      )
      # after all teardown hooks have been called
      # want funcargs and request info to go away
      if hasrequest:
          item._request = False
          item.funcargs = None
      return reports
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import bdb
  import os
  import sys
  from time import time
  import attr
  import six
  from .reports import CollectErrorRepr
  from .reports import CollectReport
  from .reports import TestReport
  from _pytest._code.code import ExceptionInfo
  from _pytest.compat import safe_str
  from _pytest.outcomes import Exit
  from _pytest.outcomes import Skipped
  from _pytest.outcomes import TEST_OUTCOME
label_desc: Use image node_id 6 for calling a global function with example usage: runtestprotocol(item, log, nextitem) and returns: reports