code: def test_clone():
      base = EngineBase(name="nodename")
      base2 = base.clone("newnodename")
  
      assert (
          base.base_dir == base2.base_dir
          and base.config == base2.config
          and base2.name == "newnodename"
      )
  
      with pytest.raises(ValueError):
          base.clone("nodename")
  
file_path: nipype/nipype/pipeline/engine/tests/test_base.py
imports: import pytest
  from ..base import EngineBase
  from ....interfaces import base
  from ....interfaces import utility
  from ...None import engine
label_desc: Use image node_id 4 for calling a global function with example usage: test_clone() without return types