def update_component_ref(component, ref):
    """
    Update the reference property for each line in a component.
    NOTE: this method mutates the lines in `component`.

    Args:
        component (`list` of Line): A list of lines
        ref (int or str): The new value for the reference property

    Returns:
        `list` of Line: the updated component.
    """
    for line in component:
        line.label.ref = ref

    return component