code: def _copy(src, dst):
      
      try:
          shutil.copy(src, dst)
      except IsADirectoryError:
          if os.path.isdir(dst):
              dst = os.path.join(dst, os.path.basename(src))
          shutil.copytree(src, dst)
docs: Copy src to dst, copying recursively if src is a directory.