code: def patch_input(**kwargs):
      """A helper to provide mocked cm patching input function which was renamed in PY3"""
      return patch.object(builtins, "input", **kwargs)
  
file_path: datalad/datalad/ui/tests/test_dialog.py
imports: import builtins
  from io import StringIO
  from unittest.mock import call, patch
  import pytest
  from datalad.ui.progressbars import progressbars
  from datalad.utils import swallow_logs
  from ...tests.utils_pytest import assert_in, assert_not_in, assert_raises, assert_re_in, eq_, ok_endswith, ok_startswith
  from ..dialog import ConsoleLog, DialogUI, IPythonUI
label_desc: Use image node_id 1 for calling a global function with example usage: patch_input() and returns: patch