code: def test_filecopy_info():
      class InputSpec(nib.TraitedSpec):
          foo = nib.traits.Int(desc="a random int")
          goo = nib.traits.Int(desc="a random int", mandatory=True)
          moo = nib.traits.Int(desc="a random int", mandatory=False)
          hoo = nib.traits.Int(desc="a random int", usedefault=True)
          zoo = nib.File(desc="a file", copyfile=False)
          woo = nib.File(desc="a file", copyfile=True)
  
      class DerivedInterface(nib.BaseInterface):
          input_spec = InputSpec
          resource_monitor = False
  
          def normalize_filenames(self):
              """A mock normalize_filenames for freesurfer interfaces that have one"""
              self.inputs.zoo = "normalized_filename.ext"
  
      assert get_filecopy_info(nib.BaseInterface) == []
  
      # Test on interface class, not instantiated
      info = get_filecopy_info(DerivedInterface)
      assert info[0]["key"] == "woo"
      assert info[0]["copy"]
      assert info[1]["key"] == "zoo"
      assert not info[1]["copy"]
      info = None
  
      # Test with instantiated interface
      derived = DerivedInterface()
      # First check that zoo is not defined
      assert derived.inputs.zoo == Undefined
      # After the first call to get_filecopy_info zoo is defined
      info = get_filecopy_info(derived)
      # Ensure that normalize_filenames was called
      assert derived.inputs.zoo == "normalized_filename.ext"
      # Check the results are consistent
      assert info[0]["key"] == "woo"
      assert info[0]["copy"]
      assert info[1]["key"] == "zoo"
      assert not info[1]["copy"]
  
imports: import os
  import warnings
  import pytest
  from ....utils.filemanip import split_filename
  from ...None import base
  from ...base import traits, Undefined
  from ....interfaces import fsl
  from ...utility.wrappers import Function
  from ....pipeline import Node
  from ..specs import get_filecopy_info
label_desc: Use image node_id 16 for calling a global function with example usage: test_filecopy_info() without return types