code: def _create_diff(diff, fun, key, prev, curr):
  
      '''
      Builds the diff dictionary.
      '''
  
      if not fun(prev):
          _create_diff_action(diff, 'added', key, curr)
      elif fun(prev) and not fun(curr):
          _create_diff_action(diff, 'removed', key, prev)
      elif not fun(curr):
          _create_diff_action(diff, 'updated', key, currf _create_diff(diff, fun, key, prev, curr):
  
      '''
      Builds the diff dictionary.
      '''
  
      if not fun(prev):
          _create_diff_action(diff, 'added', key, curr)
      elif fun(prev) and not fun(curr):
          _create_diff_action(diff, 'removed', key, prev)
      elif not fun(curr):
          _create_diff_action(diff, 'updated', key, curr)
docs: Builds the diff dictionary.