code: def is_google_cloud_instance():
      """Check if we are on a GCP virtual machine."""
      try:
          return (
              urlopen("http://metadata.google.internal").headers.get(
                  "Metadata-Flavor"
              )
              == "Google"
          )  # nosec
      except URLError:
          return False
  
imports: import logging
  import os
  from urllib.error import URLError
  from urllib.request import urlopen
label_desc: Use image node_id 1 for calling a global function with example usage: is_google_cloud_instance() and returns: unknown, False