code: def test_render_mocked(mocker, mock_render, dot):
      mock_save = mocker.patch.object(dot, "save", autospec=True)
      mock_view = mocker.patch.object(dot, "_view", autospec=True)
      mock_remove = mocker.patch("os.remove", autospec=True)
  
      assert (
          dot.render(cleanup=True, view=True)
          is mock_render.return_value
      )
  
      mock_save.assert_called_once_with(None, None, skip_existing=None)
      mock_render.assert_called_once_with(
          dot.engine,
          dot.format,
          mock_save.return_value,
          renderer=None,
          formatter=None,
          neato_no_op=None,
          outfile=None,
          raise_if_result_exists=False,
          overwrite_filepath=False,
          quiet=False,
      )
      mock_remove.assert_called_once_with(mock_save.return_value)
      mock_view.assert_called_once_with(
          mock_render.return_value, format=dot.format, quiet=False
      )
  
imports: import locale
  import pathlib
  import re
  import subprocess
  import pytest
  import graphviz
  import _common
label_desc: Use image node_id 10 for calling a global function with example usage: test_render_mocked(mocker, mock_render, dot) without return types