code: def test_check_for_studio_with_valid_request():
      metadata = {"AppType": "KernelGateway"}
      with patch(
          "builtins.open", mock_open(read_data=json.dumps(metadata))
      ):
          with patch("os.path.exists", return_value=True):
              is_studio = sagemaker.local.utils.check_for_studio()
              assert is_studio is True
  
imports: from __future__ import absolute_import
  import os
  import errno
  import pytest
  import json
  from mock import patch, Mock, mock_open
  import sagemaker.local.utils
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 16 for calling a global function with example usage: test_check_for_studio_with_valid_request() without return types