code: def OpAlmostEqual(op_a, op_b, ignore_fields=None):
      """
      Two ops are identical except for each field in the `ignore_fields`.
      """
      ignore_fields = ignore_fields or []
      if not isinstance(ignore_fields, list):
          ignore_fields = [ignore_fields]
  
      assert all(
          isinstance(f, str) for f in ignore_fields
      ), "Expect each field is text type, but got {}".format(
          ignore_fields
      )
  
      def clean_op(op):
          op = copy.deepcopy(op)
          for field in ignore_fields:
              if op.HasField(field):
                  op.ClearField(field)
          return op
  
      op_a = clean_op(op_a)
      op_b = clean_op(op_b)
      return op_a == op_b or str(op_a) == str(op_b)
  
imports: from caffe2.proto import caffe2_pb2
  from google.protobuf.message import DecodeError, Message
  from google.protobuf import text_format
  import sys
  import collections
  import copy
  import functools
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: OpAlmostEqual(op_a, op_b, ignore_fields) and returns: unknown, op