def infer_cp_features(population_df, metadata=False):
    """
    Given a dataframe, output features that we expect to be cell painting features
    """
    features = [
        x
        for x in population_df.columns.tolist()
        if (
            x.startswith("Cells_")
            | x.startswith("Nuclei_")
            | x.startswith("Cytoplasm_")
        )
    ]

    if metadata:
        features = population_df.columns[
            population_df.columns.str.startswith("Metadata_")
        ].tolist()

    assert (
        len(features) > 0
    ), "No CP features found. Are you sure this dataframe is from CellProfiler?"

    return features