def input_of_calcfunctions(node, name=''):
    """
    checks if a given node was input into a certain calcfunction
    and returns a list of calcfunction uuids of calcfunction with the given name
    """
    from aiida.orm import CalcFunctionNode
    process_uuids = []
    process_names = []
    outputs = node.get_outgoing().all_nodes()
    for out in outputs:
        if isinstance(out, CalcFunctionNode):
            try:
                label = out.get_attribute('process_label')
            except AttributeError:
                label = None
                continue
            if label == name:
                process_uuids.append(out.uuid)
                process_names.append(label)
            if not name:
                process_uuids.append(out.uuid)
                process_names.append(label)
    return process_uuids, process_names
