def get_layer_affected_elements(layer_node):
    """From a given Crank layer nodes will return the affeted elements
    of the layers

    Args:
        layer_node (dagNode or list): The Crank Layer nodes

    Returns:
        set: The elements in the layer nodes
    """
    if not isinstance(layer_node, list):
        layer_node = [layer_node]
    members = []
    for lyr in layer_node:
        members = members + lyr.layer_objects.inputs()
    return set(members)