code: def resolve_targets(
      data_frame: pd.DataFrame, target_keys: Union[str, List[str]]
  ) -> List[Any]:
      """Given a data frame and a target key or list of target keys, this function returns a list of targets.
  
      Args:
          data_frame: The ``pd.DataFrame`` containing the target column / columns.
          target_keys: The column in the data frame (or a list of columns) from which to resolve the target.
  
      """
      if not isinstance(target_keys, List):
          return data_frame[target_keys].tolist()
      return data_frame.apply(
          partial(_resolve_multi_target, target_keys), axis=1
      ).tolist()
  
file_path: lightning-flash/src/flash/core/data/utilities/data_frame.py
imports: import os
  from functools import partial
  from typing import Any, Callable, List, Optional, Union
  import pandas
  from flash.core.data.utilities.paths import PATH_TYPE
label_desc: Use image node_id 2 for calling a global function with example usage: resolve_targets(data_frame, target_keys) and returns: data_frame, data_frame