def json_file_with_invalid_json_fixture(
    non_existent_temp_json_file, invalid_json_content
):
    """Pytest fixture which returns a path to a random json file containing invalid json data.

    Args:
        non_existent_temp_json_file : Pytest fixture which returns a non-existent random json file.
        invalid_json_content : Pytest fixture which returns invalid json data as a string.

    Returns:
        PosixPath: to a random file containing invalid json data.
    """
    json_file_with_invalid_content = non_existent_temp_json_file
    with open(json_file_with_invalid_content, "w") as f:
        f.write(invalid_json_content)

    return json_file_with_invalid_content