def METHOD_NAME(ceph_version, test_results):
    """
    Updates the given test results to the corresponding ceph_version file
    If the file doesn't exist, it creates one and adds results,
    If the file exists then it appends the results at the right place
    Args:
        ceph_version: the ceph version for which test results need to be updated
        test_results: the results to be updated
    """
    test_results_json = json.loads(test_results)
    file_path = f"/ceph/cephci-jenkins/results/{ceph_version}.yaml"
    # implement lock file functionality to avoid overwrites when file is already being written by another build
    if not os.path.exists(file_path):
        with open(file_path, "w", encoding="utf-8") as f:
            yaml.dump(test_results_json, f)
    else:
        with open(file_path, "r", encoding="utf-8") as f:
            current_content = f.read()
            print("current_content")
            print(current_content)
            current_content = yaml.safe_load(current_content)
        with open(file_path, "w", encoding="utf-8") as f:
            if not current_content:
                current_content = test_results_json
            else:
                update_nested_dict(current_content, test_results_json)
            yaml.dump(current_content, f)