def check_tree_height_scale(tree_height_scale):
    if (tree_height_scale is None):
        tree_height_scale = 'time'
    if (tree_height_scale not in ['time', 'log_time', 'rank']):
        raise ValueError("tree_height_scale must be 'time', 'log_time' or 'rank'")
    return tree_height_scale
def check_tree_height_scale(tree_height_scale):
    if (tree_height_scale is None):
        tree_height_scale = 'time'
    if (tree_height_scale not in ['time', 'log_time', 'rank']):
        raise ValueError("tree_height_scale must be 'time', 'log_time' or 'rank'")
    return tree_height_scale