code: def compare_snapshots(snapshot_a, snapshot_b, raw=False):
      
      if not all(map(lambda x: isinstance(x, dict),
                     [snapshot_a, snapshot_b])):
          return {}
  
      diffs = {}
      for key_a, value_a in snapshot_a.iteritems():
          # skip fieds starting with _ or __
          if key_a.startswith("_"):
              continue
          # get the value of the second snapshot
          value_b = snapshot_b.get(key_a)
          # get the diff between the two values
          diff = diff_values(value_a, value_b, raw=raw)
          if diff is not None:
              diffs[key_a] = diff
      return diffs
docs: Returns a diff of two given snapshots (dictionaries)
  
      :param snapshot_a: First snapshot
      :param snapshot_b: Second snapshot
      :param raw: True to compare the raw values, e.g. UIDs
      :returns: Dictionary of field/value pairs that differ