def generate_line(filepath: str, filename: str, metrics: dict):
    """Convert a metrics dictionary, recording name and location to a line.

    Make them compatible with a Pandas dataframe.

    Args:
        filepath: the path to the recording.
        filename: the name of the recording.
        metrics: a dictionary of the metrics.

    Returns:
        A list with the filepath, filename and metrics.
    """
    line = [filepath, filename]
    metrics_names = [
        'condition_positive',
        'condition_negative',
        'true_positive',
        'true_negative',
        'false_positive',
        'false_negative',
        'sensitivity',
        'specificity',
        'precision',
        'accuracy',
        'f1_score',
        'negative_predictive_value',
        'miss_rate',
        'fall_out',
        'false_discovery_rate',
        'false_omission_rate',
        'prevalence_threshold',
        'thread_score',
        'balanced_accuracy',
        'matthews_correlation_coefficient',
        'fowlkes_mallows_index',
        'bookmaker informedness',
        'markedness']

    line.extend(
        (metrics[metrics_name] for metrics_name in metrics_names),
    )

    return line