code: def hardlink_tree(src, dst):
      if not os.path.exists(src):
          raise CustomFsError(errno.ENOENT, filename=src)
      if os.path.isfile(src):
          hardlink(src, dst)
          return
      for dirpath, _, filenames in walk_relative(src):
          src_dirpath = (
              os.path.join(src, dirpath) if dirpath != "." else src
          )
          dst_dirpath = (
              os.path.join(dst, dirpath) if dirpath != "." else dst
          )
          os.mkdir(dst_dirpath)
          for filename in filenames:
              hardlink(
                  os.path.join(src_dirpath, filename),
                  os.path.join(dst_dirpath, filename),
              )
  
imports: import codecs
  import errno
  import logging
  import os
  import random
  import shutil
  import six
  import stat
  import sys
  import library.python.func
  import library.python.strings
  import library.python.windows
label_desc: Use image node_id 16 for calling a global function with example usage: hardlink_tree(src, dst) without return types