code: def mock_tty(mocker):
      return mocker.patch("sys.stdout.isatty", return_value=True)
  
file_path: dvc/tests/unit/test_updater.py
imports: import json
  import logging
  import os
  import time
  import pytest
  from dvc import __version__
  from dvc.updater import Updater
  from tests.func.parsing.test_errors import escape_ansi
label_desc: Use image node_id 4 for calling a global function with example usage: mock_tty(mocker) and returns: mocker