code: def hardlink_or_copy(src, dst):
      if os.name == "nt":
          shutil.copy(src, dst)
      else:
          try:
              os.link(src, dst)
          except OSError as e:
              if e.errno == errno.EEXIST:
                  return
              elif e.errno == errno.EXDEV:
                  sys.stderr.write(
                      "Can't make cross-device hardlink - fallback to copy: {} -> {}\n".format(
                          src, dst
                      )
                  )
                  shutil.copy(src, dst)
              else:
                  raise
  
file_path: catboost/build/scripts/copy_to_dir.py
imports: import argparse
  import errno
  import sys
  import os
  import shutil
  import tarfile
label_desc: Use image node_id 3 for calling a global function with example usage: hardlink_or_copy(src, dst) without return types