code: def assert_operator(value1, value2, msg="", op=operator.eq):
      """Check Boolean statement."""
      try:
          if op == operator.is_:
              value1 = bool(value1)
          assert op(value1, value2)
      except AssertionError:
          raise AssertionError(msg.format(str(value2), str(value1)))
  
file_path: dipy/dipy/testing/__init__.py
imports: import operator
  from functools import partial
  from os.path import dirname, abspath, join
  from numpy.testing import assert_array_equal
  import numpy
  import numpy.testing
  import scipy
  from packaging.version import Version
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: assert_operator(value1, value2, msg, op) without return types