code: def wrap_data_source(df: DataFrame) -> DataSource:
      if isinstance(df, dd.core.DataFrame):
          return DaskDataSource(df)
      return DataframeSource(df)
  
imports: from abc import ABC, abstractmethod
  from typing import List, Tuple
  import dask.dataframe
  import pandas
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.utils.audio_utils import is_audio_score
  from ludwig.utils.automl.utils import avg_num_tokens
  from ludwig.utils.image_utils import is_image_score
  from ludwig.utils.misc_utils import memoized_method
  from ludwig.utils.types import DataFrame
label_desc: Use image node_id 1 for calling a global function with example usage: wrap_data_source(df) and returns: DataframeSource, DaskDataSource