code: def filter_publisher_references(root, head, update):
      
      if 'references' in head:
          root = _remove_if_present(root, 'references')
          update = _remove_if_present(update, 'references')
  
      return root, head, update
docs: Remove references from ``update`` if there are any in ``head``.
  
      This is useful when merging a record from a publisher with an update form arXiv,
      as arXiv should never overwrite references from the publisher.