def label_performance(delta_s, cutoff=0.1):  # Tested [Y]

    """
    Takes the change of a given performance metric and outputs a label; up, down or flat.

    Args:
        delta_s (float): The change in performance metric from the previous period.
        cutoff (float): Default=0.1. Value to use to determine whether a performance metric is no longer 'flat'

    Returns:
        (str) 1,2 or 3 where 1 is down, 2 is flat and 3 is up.
    """
    # May want to switch labels to; ('up'=1, 'flat'=0, 'down'=-1)
    if delta_s > cutoff:  # Branch A
        return 2
    elif abs(delta_s) > cutoff:  # Branch B
        return 0
    else:  # Branch C
        return 1