def METHOD_NAME(docs, include_stress=False, **kwargs):
    """
    Method to convert a list of docs into objects, e.g.,
    Structure and DataFrame.
    Args:
        docs ([dict]): List of docs. Each doc should have the same
            format as one returned from .dft.parse_dir.
        include_stress (bool): Whether to include stress components.
        **kwargs: Passthrough.
    Returns:
        A list of structures, and a DataFrame with energy and force
        data in 'y_orig' column, data type ('energy' or 'force') in
        'dtype' column, No. of atoms in 'n' column sharing the same row
        of energy data while 'n' being 1 for the rows of force data.
    """
    structures, y_orig, n, dtype = [], [], [], []
    for d in docs:
        structure = Structure.from_dict(d["structure"]) if isinstance(d["structure"], dict) else d["structure"]
        outputs = d["outputs"]
        force_arr = np.array(outputs["forces"])
        assert force_arr.shape == (len(structure), 3), "Wrong force array not matching structure"
        force_arr = force_arr.ravel()
        if include_stress:
            virial_stress = outputs["virial_stress"]
            y = np.concatenate(([outputs["energy"]], force_arr, virial_stress))
            dtype.extend(["energy"] + ["force"] * len(force_arr) + ["stress"] * len(virial_stress))
        else:
            y = np.concatenate(([outputs["energy"]], force_arr))
            dtype.extend(["energy"] + ["force"] * len(force_arr))
        y_orig.append(y)
        n.append(np.insert(np.ones(len(y) - 1), 0, d["num_atoms"]))
        structures.append(structure)
    df = pd.DataFrame(dict(y_orig=np.concatenate(y_orig), n=np.concatenate(n), dtype=dtype))
    for k, v in kwargs.items():
        df[k] = v
    return structures, df