code: def _prepare_data(data, data_transformers):
      """Convert input data to data for use within schema"""
      if data is None or isinstance(data, dict):
          return data
      elif isinstance(data, pd.DataFrame):
          return curried.pipe(data, data_transformers.get())
      elif isinstance(data, str):
          return {"url": data}
      else:
          warnings.warn(
              "data of type {} not recognized".format(type(data)),
              stacklevel=1,
          )
          return data
  
file_path: altair/altair/_magics.py
imports: import json
  import warnings
  import IPython
  from IPython.core import magic_arguments
  import pandas
  from toolz import curried
  from altair.vegalite import v5
label_desc: Use image node_id 1 for calling a global function with example usage: _prepare_data(data, data_transformers) and returns: data, curried, dict, data