code: def current_platform():
      if os.environ.get("AZURE_SERVICE", None) == SYNAPSE_PROJECT_NAME:
          from pyspark.sql import SparkSession
  
          sc = SparkSession.builder.getOrCreate().sparkContext
          cluster_type = sc.getConf().get("spark.cluster.type")
          if cluster_type == "synapse":
              return PLATFORM_SYNAPSE
          else:
              return PLATFORM_SYNAPSE_INTERNAL
      elif "dbfs" in os.listdir("/"):
          return PLATFORM_DATABRICKS
      elif os.environ.get("BINDER_LAUNCH_HOST", None) is not None:
          return PLATFORM_BINDER
      else:
          return PLATFORM_UNKNOWN
  
file_path: SynapseML/core/src/main/python/synapse/ml/core/platform/Platform.py
imports: import os
  from pyspark.sql import DataFrame
label_desc: Use image node_id 1 for calling a global function with example usage: current_platform() and returns: PLATFORM_SYNAPSE, PLATFORM_SYNAPSE_INTERNAL, PLATFORM_DATABRICKS, PLATFORM_BINDER, PLATFORM_UNKNOWN