code: def test_ignored_output(tmp_dir, scm, dvc, run_copy):
      tmp_dir.gen(
          {".dvcignore": "*.log\n!foo.log", "foo": "foo content"}
      )
  
      with pytest.raises(OutputIsIgnoredError):
          run_copy("foo", "abc.log", name="copy")
  
      run_copy("foo", "foo.log", name="copy")
  
imports: import os
  import shutil
  from pathlib import Path
  from typing import List
  import pytest
  from dvc.ignore import DvcIgnore, DvcIgnorePatterns
  from dvc.output import OutputIsIgnoredError
  from dvc.pathspec_math import PatternInfo, merge_patterns
  from dvc.repo import Repo
  from dvc.testing.tmp_dir import TmpDir
  from dvc_data.hashfile.build import IgnoreInCollectedDirError
  from dvc_data.hashfile.utils import get_mtime_and_size
label_desc: Use image node_id 21 for calling a global function with example usage: test_ignored_output(tmp_dir, scm, dvc, run_copy) without return types