code: def test_diagflat(
      *, test_flags, backend_fw, fn_name, args_packet, on_device
  ):
      (
          dtype_x,
          offset,
          dtype_padding_value,
          align,
          num_rows,
          num_cols,
      ) = args_packet
  
      x_dtype, x = dtype_x
      padding_value_dtype, padding_value = dtype_padding_value
      padding_value = padding_value[0][0]
  
      helpers.test_function(
          input_dtypes=x_dtype + ["int64"] + padding_value_dtype,
          test_flags=test_flags,
          backend_to_test=backend_fw,
          fn_name=fn_name,
          x=x[0],
          offset=offset,
          padding_value=padding_value,
          align=align,
          num_rows=num_rows,
          num_cols=num_cols,
          on_device=on_device,
          atol_=1e-01,
          rtol_=1 / 64,
      )
  
imports: import math
  from hypothesis import strategies
  from hypothesis import assume
  import numpy
  import pytest
  import itertools
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
  import ivy
label_desc: Use image node_id 26 for calling a global function with example usage: test_diagflat() without return types