class_docstr: Tests of input validation and output correctness of function `generate_shift_rule`.
class_docstr_tok: ["Tests","of","input","validation","and","output","correctness","of","function","`","generate_shift_rule","`","."]
docstr: Test that the second order shift rule is correct and
  properly simplified for generators with non-equidistant frequencies
code: def test_second_order_non_equidistant_shift_rule(self):
      """Test that the second order shift rule is correct and
      properly simplified for generators with non-equidistant frequencies
      """
      frequencies = (2, 3)
      generated_terms = generate_shift_rule(frequencies, order=2)
      correct_terms = [
          [-6, 0],
          [3.91421356, -np.pi / 4],
          [3.91421356, np.pi / 4],
          [-1, -np.pi / 2],
          [-1, np.pi / 2],
          [0.08578644, -3 * np.pi / 4],
          [0.08578644, 3 * np.pi / 4],
      ]
      assert np.allclose(generated_terms, correct_terms)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.gradients.general_shift_rules import eigvals_to_frequencies, frequencies_to_period, generate_shift_rule, _get_shift_rule, generate_multi_shift_rule, generate_shifted_tapes, generate_multishifted_tapes, _iterate_shift_rule_with_multipliers
label_desc: Use image node_id 13 for calling the TestGenerateShiftRule obj's underlying member method code with example usage: obj.test_second_order_non_equidistant_shift_rule() without return types