code: def can_symlink():
      global _can_symlink
      if _can_symlink is not None:
          return _can_symlink
      # WASI / wasmtime prevents symlinks with absolute paths, see man
      # openat2(2) RESOLVE_BENEATH. Almost all symlink tests use absolute
      # paths. Skip symlink tests on WASI for now.
      src = os.path.abspath(TESTFN)
      symlink_path = src + "can_symlink"
      try:
          os.symlink(src, symlink_path)
          can = True
      except (OSError, NotImplementedError, AttributeError):
          can = False
      else:
          os.remove(symlink_path)
      _can_symlink = can
      return can
  
imports: import collections.abc
  import contextlib
  import errno
  import os
  import re
  import stat
  import string
  import sys
  import time
  import unittest
  import warnings
  from test import support
label_desc: Use image node_id 2 for calling a global function with example usage: can_symlink() and returns: can, _can_symlink