def _unpack_data(data):
    """
    Break Xs, Ys, and metadata out into separate lists for data preprocessing.
    Run basic data validation.
    """
    xs = [None] * len(data)
    ys = [None] * len(data)
    metadata = [None] * len(data)
    for idx, example in enumerate(data):
        if isinstance(example, (list, tuple)):
            xs[idx], ys[idx], metadata[idx] = _unpack_list(example)
        if isinstance(example, dict):
            xs[idx], ys[idx], metadata[idx] = _unpack_dict(example)

    return xs, ys, metadata
Break Xs, Ys, and metadata out into separate lists for data preprocessing.
    Run basic data validation.