def allow_duplicate_nodes(enable=True):
    """
    Nodes with the same full name (including module and class names)
    are not allowed because it means they can't be differentiated
    correctly when unpickling.

    However when reloading modules duplicate nodes occur because
    existing nodes are redeclared. This is something that only
    happens during development, and so this function is here to
    allow that, but the default is not to allow it.
    """
    global _allow_duplicate_nodes
    _allow_duplicate_nodes = enable
