code: def test_flags(self):
      x = np.array([[1, 2], [3, 4]], order="F")
      p = ndpointer(flags="FORTRAN")
      assert_(p.from_param(x))
      p = ndpointer(flags="CONTIGUOUS")
      assert_raises(TypeError, p.from_param, x)
      p = ndpointer(flags=x.flags.num)
      assert_(p.from_param(x))
      assert_raises(TypeError, p.from_param, np.array([[1, 2], [3, 4]]))
  
imports: import sys
  import sysconfig
  import weakref
  from pathlib import Path
  import pytest
  import numpy
  from numpy.ctypeslib import ndpointer, load_library, as_array
  from numpy.testing import assert_, assert_array_equal, assert_raises, assert_equal
label_desc: Use image node_id 4 for calling the TestNdpointer obj's underlying member method code with example usage: obj.test_flags() without return types