code: def get_project_id():
      
      if os.name == 'nt':
          command = _CLOUD_SDK_WINDOWS_COMMAND
      else:
          command = _CLOUD_SDK_POSIX_COMMAND
  
      try:
          output = subprocess.check_output(
              (command,) + _CLOUD_SDK_CONFIG_COMMAND,
              stderr=subprocess.STDOUT)
      except (subprocess.CalledProcessError, OSError, IOError):
          return None
  
      try:
          configuration = json.loads(output.decode('utf-8'))
      except ValueError:
          return None
  
      try:
          return configuration['configuration']['properties']['core']['project']
      except KeyError:
          return None
docs: Gets the project ID from the Cloud SDK.
  
      Returns:
          Optional[str]: The project ID.