code: def test_copy_file_hard_link(self):
      with open(self.source, "w") as f:
          f.write("some content")
      st = os.stat(self.source)
      copy_file(self.source, self.target, link="hard")
      st2 = os.stat(self.source)
      st3 = os.stat(self.target)
      self.assertTrue(os.path.samestat(st, st2), (st, st2))
      self.assertTrue(os.path.samestat(st2, st3), (st2, st3))
      with open(self.source, "r") as f:
          self.assertEqual(f.read(), "some content")
  
file_path: catboost/contrib/tools/python/src/Lib/distutils/tests/test_file_util.py
imports: import unittest
  import os
  import shutil
  from distutils.file_util import move_file, write_file, copy_file
  from distutils import log
  from distutils.tests import support
  from test.test_support import run_unittest
label_desc: Use image node_id 7 for calling the FileUtilTestCase obj's underlying member method code with example usage: obj.test_copy_file_hard_link() without return types