def _make_row(old, parent_key=None):
    """Make nested dictionary into a single-level dictionary, with additional processing for lists

    For example:

    {
        "metadata": {
            "durations": {
                "call": 38.6015,
                "setup": 0.0021
            },
            "statuses": {
                "call": ["failed", False],
                "setup": ["passed", False]
            }
        },
        "result": "failed",
        "test_id": "test_navigation"
    }

    becomes:

    {
        "metadata.durations.call": 38.6015,
        "metadata.durations.setup": 0.0021,
        "metadata.statuses.call": "\"failed\",False",
        "metadata.statuses.setup": "\"passed\",False",
        "result": "failed",
        "test_id": "test_navigation"
    }

    :param old: The old dictionary to flatten
    :type old: dict
    :param parent_key: The key of the parent object
    :type parent_key: str | None

    :rtype: dict
    """
    new = {}
    for key, value in old.items():
        new_key = "{}.{}".format(parent_key, str(key)) if parent_key else str(key)
        if isinstance(value, dict):
            new.update(_make_row(value, new_key))
        elif isinstance(value, list):
            new[new_key] = ",".join([str(v) for v in value])
        else:
            new[new_key] = value
    return new