code: def _check_laplacian_dtype(
      A,
      desired_L,
      desired_d,
      normed,
      use_out_degree,
      copy,
      dtype,
      arr_type,
  ):
      mat = arr_type(A, dtype=dtype)
      L, d = csgraph.laplacian(
          mat,
          normed=normed,
          return_diag=True,
          use_out_degree=use_out_degree,
          copy=copy,
          dtype=dtype,
      )
      assert L.dtype == dtype
      assert d.dtype == dtype
      desired_L = np.asarray(desired_L).astype(dtype)
      desired_d = np.asarray(desired_d).astype(dtype)
      _assert_allclose_sparse(L, desired_L, atol=1e-12)
      _assert_allclose_sparse(d, desired_d, atol=1e-12)
  
      if not copy:
          if not (normed and check_int_type(mat)):
              if type(mat) is np.ndarray:
                  assert_allclose(L, mat)
              elif mat.format == "coo":
                  _assert_allclose_sparse(L, mat)
  
file_path: scipy/scipy/sparse/csgraph/tests/test_graph_laplacian.py
imports: import pytest
  import numpy
  from numpy.testing import assert_allclose
  from pytest import raises
  from scipy import sparse
  from scipy.sparse import csgraph
  from scipy._lib._util import np_long, np_ulong
label_desc: Use image node_id 8 for calling a global function with example usage: _check_laplacian_dtype(A, desired_L, desired_d, normed, use_out_degree, copy, dtype, arr_type) without return types