code: def _create_backend_for_dataframe(
      df: SparkDataFrame,
  ) -> pipeline_dp.PipelineBackend:
      """Creates a pipeline backend based on type of DataFrame."""
      if isinstance(df, SparkDataFrame):
          return pipeline_dp.SparkRDDBackend(
              df.sparkSession.sparkContext
          )
      raise NotImplementedError(
          f"Dataframes of type {type(df)} not yet supported"
      )
  
imports: import abc
  import copy
  from collections import namedtuple
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import pipeline_dp
  import pyspark
label_desc: Use image node_id 1 for calling a global function with example usage: _create_backend_for_dataframe(df) and returns: pipeline_dp