code: def _is_spark_df(x) -> bool:
      try:
          import pyspark.sql.dataframe
  
          if isinstance(x, pyspark.sql.dataframe.DataFrame):
              return True
      except ImportError:
          return False
      # For spark 4.0
      try:
          import pyspark.sql.connect.dataframe
  
          return isinstance(x, pyspark.sql.connect.dataframe.DataFrame)
      except ImportError:
          return False
  
imports: import logging
  import warnings
  from collections import defaultdict
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import pandas
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.types import DataType
  from mlflow.types.schema import Array, ColSpec, Object, ParamSchema, ParamSpec, Property, Schema, TensorSpec
label_desc: Use image node_id 13 for calling a global function with example usage: _is_spark_df(x) and returns: isinstance, True, False, False