code: def check_info_fields(
      expected, actual, has_raw_info, ignore_long=True
  ):
      """
      Check if info fields are equal.
  
      Some fields are ignored.
      """
      expected = expected.info.copy()
      actual = actual.info.copy()
  
      if not has_raw_info:
          _remove_ignored_info_fields(expected)
          _remove_ignored_info_fields(actual)
  
      _remove_long_info_fields(expected)
      _remove_long_info_fields(actual)
  
      # we annoyingly have two ways of representing this, so just always use
      # an empty list here
      for obj in (expected, actual):
          if obj.get("dig", None) is None:
              with obj._unlock():
                  obj["dig"] = []
  
      d = object_diff(actual, expected, allclose=True)
      assert d == "", d
  
file_path: mne-python/mne/io/fieldtrip/tests/helpers.py
imports: import os
  from functools import partial
  import numpy
  import mne
  from mne.utils import object_diff
label_desc: Use image node_id 10 for calling a global function with example usage: check_info_fields(expected, actual, has_raw_info, ignore_long) without return types