class_docstr: gh-15467 and gh-19125 
class_docstr_tok: ["gh-15467","and","gh-19125"]
code: def _do_test(self, t1, t2, arg=2):
      if arg is None:
          x = t1()
      elif isinstance(arg, tuple):
          if t1 is np.clongdouble:
              pytest.xfail(
                  "creating a clongdouble from real and "
                  "imaginary parts isn't supported"
              )
          x = t1(*arg)
      else:
          x = t1(arg)
      arr = np.array(x, dtype=t2)
      # type should be preserved exactly
      if t2 is None:
          assert arr.dtype.type is t1
      else:
          assert arr.dtype.type is t2
  
imports: import pytest
  import numpy
  from numpy.testing import assert_equal, assert_almost_equal, assert_warns
label_desc: Use image node_id 1 for calling the TestArrayFromScalar obj's underlying member method code with example usage: obj._do_test(t1, t2, arg) without return types