def _pickle_custom_node(node, base_node, base_node_method_name, kwargs):
    """
    same as _pickle_node but with the addition of kwargs
    if the node was created using a MDFCustomNodeMethod.
    """
    if base_node is not None:
        return (node.name, node._modulename, node._is_bound, base_node,
            base_node_method_name, kwargs)
    return node.name, node._modulename, node._is_bound, None, None, None
