code: def test_matrix_diag_part_forward_backward(
      seed, ctx, func_name, shape
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(*shape).astype(np.float32) * 0.1]
      function_tester(
          rng,
          F.matrix_diag_part,
          ref_matrix_diag_part,
          inputs,
          func_args=[],
          atol_b=1e-3,
          ctx=ctx,
          func_name=func_name,
      )
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: test_matrix_diag_part_forward_backward(seed, ctx, func_name, shape) without return types