code: def flaky_xfail_mark(exception, issue_numbers):
      """
      A mark for a test that occasionally fails with the given exception, associated with one or more
      issues in issue_numbers.
      """
      if isinstance(issue_numbers, int):
          issue_numbers = [issue_numbers]
  
      if not issue_numbers:
          raise ValueError(
              "at least one issue must be specified when marking a test as flaky"
          )
  
      issues = " ".join(
          f"<https://github.com/stellargraph/stellargraph/issues/{num}>"
          for num in issue_numbers
      )
      return pytest.mark.xfail(
          raises=exception, reason=f"flaky: {issues}"
      )
  
imports: import pytest
  import tensorflow
  import stellargraph
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: flaky_xfail_mark(exception, issue_numbers) and returns: pytest