code: def xfail_if_not_implemented(msg="Not implemented"):
      try:
          yield
      except NotImplementedError as e:
          pytest.xfail(reason="{}: {}".format(msg, e))
  
imports: import contextlib
  import numbers
  import os
  import re
  import warnings
  from itertools import product
  import numpy
  import pytest
  import torch
  import torch.cuda
  from numpy.testing import assert_allclose
  from pytest import approx
label_desc: Use image node_id 9 for calling a global function with example usage: xfail_if_not_implemented(msg) without return types