def METHOD_NAME(f0, dur, ratio, frm_tol=5):
    if f0 is None:
        seg_f0 = torch.zeros_like(dur, dtype=torch.float)
    else:
        seg_f0 = align_f0_to_durations(f0, dur, ratio, tol=frm_tol * ratio)
    return seg_f0.numpy()  # try a hacky stuff