code: def get_headers_diff(file_headers, names=None):
      """Get difference between headers
  
      Parameters
      ----------
      file_headers: list of actual headers (dicts) from files
      names: list of header fields to test
  
      Returns
      -------
      dict
        str: list for each header field which differs, return list of
        values per each file
      """
      difference = OrderedDict()
      fields = names
  
      if names is None:
          fields = file_headers[0].keys()
  
      # for each header field
      for field in fields:
          values = [
              header.get(field) for header in file_headers
          ]  # get corresponding value
  
          # if these values are different, store them in a dictionary
          if are_values_different(*values):
              difference[field] = values
  
      return difference
  
file_path: nibabel/nibabel/cmdline/diff.py
imports: import hashlib
  import os
  import re
  import sys
  from collections import OrderedDict
  from optparse import Option, OptionParser
  import numpy
  import nibabel
  import nibabel.cmdline.utils
label_desc: Use image node_id 3 for calling a global function with example usage: get_headers_diff(file_headers, names) and returns: difference