def METHOD_NAME(loaded_doses, loaded_plan):
    baselines = {}
    displacements = list(range(-100, 110, 10))
    depths = list(range(0, 310, 10))
    for key, dose_dataset in loaded_doses.items():
        baselines[key] = {}
        extracted_dose = depth_dose(depths, dose_dataset, loaded_plan)
        rounded_result = np.around(extracted_dose, decimals=2)
        baselines[key]["depth"] = rounded_result.tolist()
        for direction in ["inplane", "crossplane"]:
            baselines[key][direction] = {}
            for depth in [50, 100]:
                extracted_dose = profile(
                    displacements, depth, direction, dose_dataset, loaded_plan
                )
                rounded_result = np.around(extracted_dose, decimals=2)
                baselines[key][direction][str(depth)] = rounded_result.tolist()
    if CREATE_BASELINE:
        with open(BASELINE_FILEPATH, "w") as a_file:
            json.dump(baselines, a_file)
    else:
        with open(BASELINE_FILEPATH) as a_file:
            baseline_result = json.load(a_file)
        assert baseline_result == baselines