class_docstr: Tests for is_independent, which tests a function to be
  independent of its inputs, using Autograd.
class_docstr_tok: ["Tests","for","is_independent",",","which","tests","a","function","to","be","independent","of","its","inputs",",","using","Autograd","."]
docstr: Tests the utility ``_get_random_args`` using a fixed seed.
docstr_tok: ["Tests","the","utility","``","_get_random_args","``","using","a","fixed","seed","."]
code: def test_get_random_args(self, args, num, bounds):
      """Tests the utility ``_get_random_args`` using a fixed seed."""
      seed = 921
      rnd_args = _get_random_args(
          args, self.interface, num, seed, bounds
      )
      assert len(rnd_args) == num
      rng = np.random.default_rng(seed)
      for _rnd_args in rnd_args:
          expected = tuple(
              rng.random(np.shape(arg)) * (bounds[1] - bounds[0])
              + bounds[0]
              for arg in args
          )
          assert all(
              np.allclose(_exp, _rnd)
              for _exp, _rnd in zip(expected, _rnd_args)
          )
  
imports: import pytest
  import numpy
  from pennylane import numpy
  import pennylane
  from pennylane.math import is_independent
  from pennylane.math.is_independent import _get_random_args
label_desc: Use image node_id 1 for calling the TestIsIndependentAutograd obj's underlying member method code with example usage: obj.test_get_random_args(args, num, bounds) without return types