code: def _called_from_notebook():
      """Detects if we are currently executing in a notebook environment."""
      client_env = google_api_client.get_client_environment_name()
      if client_env in (
          google_api_client.ClientEnvironment.KAGGLE_NOTEBOOK.name,
          google_api_client.ClientEnvironment.COLAB.name,
      ):
          return True
      if (
          client_env
          == google_api_client.ClientEnvironment.HOSTED_NOTEBOOK
      ):
          logger.warning(
              "Vertex AI notebook environment is not supported."
          )
      return False
  
file_path: cloud/src/python/tensorflow_cloud/core/run.py
imports: import logging
  import os
  import sys
  import uuid
  from .None import containerize
  from .None import deploy
  from .None import docker_config
  from .None import machine_config
  from .None import preprocess
  from .None import validate
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 4 for calling a global function with example usage: _called_from_notebook() and returns: False, True