code: def check_results_sample(
      T1, mat_ref, T0=None, reverse=False, atol=1e-6
  ):
      ndim = mat_ref.shape[0] - 1
      ref_T1 = None
      if T0 is not None:
          mat_T0 = np.identity(ndim + 1)
          mat_T0[:ndim, :] = T0
          if reverse:
              mat_T1 = np.dot(mat_T0, mat_ref)
          else:
              mat_T1 = np.dot(mat_ref, mat_T0)
          ref_T1 = mat_T1[:ndim, :]
      else:
          ref_T1 = mat_ref[:ndim, :]
      assert np.allclose(T1, ref_T1, atol=1e-6)
  
imports: import random
  import warnings
  import numpy
  from scipy.spatial.transform import Rotation
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops.transforms
  import nvidia.dali.ops
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  from sequences_test_utils import ArgData, ArgDesc, sequence_suite_helper, ArgCb, ParamsProvider
  from nose_utils import assert_raises
label_desc: Use image node_id 1 for calling a global function with example usage: check_results_sample(T1, mat_ref, T0, reverse, atol) without return types