code: def test_outputmultipath_collapse(tmpdir):
      """Test an OutputMultiPath whose initial value is ``[[x]]`` to ensure that
      it is returned as ``[x]``, regardless of how accessed."""
      select_if = niu.Select(inlist=[[1, 2, 3], [4]], index=1)
      select_nd = pe.Node(
          niu.Select(inlist=[[1, 2, 3], [4]], index=1), name="select_nd"
      )
  
      ifres = select_if.run()
      ndres = select_nd.run()
  
      assert ifres.outputs.out == [4]
      assert ndres.outputs.out == [4]
      assert select_nd.result.outputs.out == [4]
  
imports: import os
  from copy import deepcopy
  import pytest
  from ....None import config
  from ....interfaces import utility
  from ....interfaces import base
  from ...None import engine
  from ..utils import merge_dict
  from .test_base import EngineTestInterface
  from .test_utils import UtilsTestInterface
label_desc: Use image node_id 10 for calling a global function with example usage: test_outputmultipath_collapse(tmpdir) without return types