code: def test_global_CommandLine_output(tmpdir):
      """Ensures CommandLine.set_default_terminal_output works"""
      from nipype.interfaces.fsl import BET
  
      ci = nib.CommandLine(command="ls -l")
      assert ci.terminal_output == "stream"  # default case
  
      ci = BET()
      assert ci.terminal_output == "stream"  # default case
  
      with mock.patch.object(nib.CommandLine, "_terminal_output"):
          nib.CommandLine.set_default_terminal_output("allatonce")
          ci = nib.CommandLine(command="ls -l")
          assert ci.terminal_output == "allatonce"
  
          nib.CommandLine.set_default_terminal_output("file")
          ci = nib.CommandLine(command="ls -l")
          assert ci.terminal_output == "file"
  
          # Check default affects derived interfaces
          ci = BET()
          assert ci.terminal_output == "file"
  
imports: import os
  import simplejson
  import logging
  import pytest
  from unittest import mock
  from ....None import config
  from ....testing import example_data
  from ...None import base
  from ..support import _inputs_help
label_desc: Use image node_id 18 for calling a global function with example usage: test_global_CommandLine_output(tmpdir) without return types