import copy


def get_shared_data(component):
    """
    Returns the actual list of component data based on how data is
    stored in component, either from the `data` attribute or from the
    `data['content']` attribute.

    Returns:
        list: List of component data.
    """
    if component:
        return (copy.deepcopy(component.data)
                if 'content' not in component.data
                else copy.deepcopy(component.data['content']))
    else:
        return []