'Remove an empty "References" section.
Called after the `references.TargetNotes` transform is complete.'

def cleanup_callback(self, pending):

    if (len(pending.parent) == 2):
        pending.parent.parent.remove(pending.parent)
