code: def to_arrays(data, columns, coerce_float=False, dtype=None):
      """
      Return list of arrays, columns.
      """
      if isinstance(data, ABCDataFrame):
          if columns is not None:
              arrays = [
                  data._ixs(i, axis=1).values
                  for i, col in enumerate(data.columns)
                  if col in columns
              ]
          else:
              columns = data.columns
              arrays = [
                  data._ixs(i, axis=1).values
                  for i in range(len(columns))
              ]
  
          return arrays, columns
  
      if not len(data):
          if isinstance(data, np.ndarray):
              columns = data.dtype.names
              if columns is not None:
                  return [[]] * len(columns), columns
          return [], []  # columns if columns is not None else []
      if isinstance(data[0], (list, tuple)):
          return _list_to_arrays(
              data, columns, coerce_float=coerce_float, dtype=dtype
          )
      elif isinstance(data[0], compat.Mapping):
          return _list_of_dict_to_arrays(
              data, columns, coerce_float=coerce_float, dtype=dtype
          )
      elif isinstance(data[0], ABCSeries):
          return _list_of_series_to_arrays(
              data, columns, coerce_float=coerce_float, dtype=dtype
          )
      elif isinstance(data[0], Categorical):
          if columns is None:
              columns = ibase.default_index(len(data))
          return data, columns
      elif (
          isinstance(data, (np.ndarray, ABCSeries, Index))
          and data.dtype.names is not None
      ):
          columns = list(data.dtype.names)
          arrays = [data[k] for k in columns]
          return arrays, columns
      else:
          # last ditch effort
          data = lmap(tuple, data)
          return _list_to_arrays(
              data, columns, coerce_float=coerce_float, dtype=dtype
          )
  
imports: from collections import OrderedDict
  import numpy
  import numpy.ma
  from pandas._libs import lib
  from pandas._libs.tslibs import IncompatibleFrequency
  import pandas.compat
  from pandas.compat import get_range_parameters, lmap, lrange, raise_with_traceback, range
  from pandas.core.dtypes.cast import construct_1d_arraylike_from_scalar, construct_1d_ndarray_preserving_na, construct_1d_object_array_from_listlike, infer_dtype_from_scalar, maybe_cast_to_datetime, maybe_cast_to_integer_array, maybe_castable, maybe_convert_platform, maybe_infer_to_datetimelike, maybe_upcast
  from pandas.core.dtypes.common import is_categorical_dtype, is_datetime64tz_dtype, is_dtype_equal, is_extension_array_dtype, is_extension_type, is_float_dtype, is_integer_dtype, is_iterator, is_list_like, is_object_dtype, pandas_dtype
  from pandas.core.dtypes.generic import ABCDataFrame, ABCDatetimeIndex, ABCIndexClass, ABCPandasArray, ABCPeriodIndex, ABCSeries, ABCTimedeltaIndex
  from pandas.core.dtypes.missing import isna
  from pandas.core import algorithms, common
  from pandas.core.arrays import Categorical, ExtensionArray, period_array
  from pandas.core.index import Index, _get_objs_combined_axis, _union_indexes, ensure_index
  from pandas.core.indexes import base
  from pandas.core.internals import create_block_manager_from_arrays, create_block_manager_from_blocks
  from pandas.core.internals.arrays import extract_array
label_desc: Use image node_id 11 for calling a global function with example usage: to_arrays(data, columns, coerce_float, dtype) and returns: arrays,  columns, list,  list, _list_to_arrays, _list_of_dict_to_arrays, unknown,  columns, _list_of_series_to_arrays, data,  columns, arrays,  columns, _list_to_arrays