code: def xfail(reason=""):
      """
      Imperatively xfail an executing test or setup functions with the given reason.
  
      This function should be called only during testing (setup, call or teardown).
  
      .. note::
          It is better to use the :ref:`pytest.mark.xfail ref` marker when possible to declare a test to be
          xfailed under certain conditions like known bugs or missing features.
      """
      __tracebackhide__ = True
      raise XFailed(reason)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  from packaging.version import Version
label_desc: Use image node_id 4 for calling a global function with example usage: xfail(reason) without return types