code: def _gen_array(dtype):
      if cupy.issubdtype(dtype, cupy.unsignedinteger):
          array = cupy.random.randint(0, 10, size=(2, 3)).astype(dtype)
      elif cupy.issubdtype(dtype, cupy.integer):
          array = cupy.random.randint(-10, 10, size=(2, 3)).astype(
              dtype
          )
      elif cupy.issubdtype(dtype, cupy.floating):
          array = cupy.random.rand(2, 3).astype(dtype)
      elif cupy.issubdtype(dtype, cupy.complexfloating):
          array = cupy.random.random((2, 3)).astype(dtype)
      elif dtype == cupy.bool_:
          array = cupy.random.randint(0, 2, size=(2, 3)).astype(
              cupy.bool_
          )
      else:
          assert False, f"unrecognized dtype: {dtype}"
      return array
  
imports: import unittest
  import pytest
  import cupy
  from cupy import cuda
  from cupy import testing
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_array(dtype) and returns: array