class_docstr: Test that differentiating edge case tapes with ``pulse_odegen`` works.
class_docstr_tok: ["Test","that","differentiating","edge","case","tapes","with","``","pulse_odegen","``","works","."]
docstr: Test that an error is raised for a broadcasted/batched tape.
docstr_tok: ["Test","that","an","error","is","raised","for","a","broadcasted\/batched","tape","."]
code: def test_batched_tape_raises(self):
      """Test that an error is raised for a broadcasted/batched tape."""
      tape = qml.tape.QuantumScript(
          [qml.RX([0.4, 0.2], 0)], [qml.expval(qml.PauliZ(0))]
      )
      _match = "Computing the gradient of broadcasted tapes with the pulse generator"
      with pytest.raises(NotImplementedError, match=_match):
          pulse_odegen(tape)
  
imports: import copy
  import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.ops.qubit.special_unitary import pauli_basis_matrices, pauli_basis_strings
  from pennylane.math import expand_matrix
  from pennylane.gradients.pulse_gradient_odegen import _generate_tapes_and_coeffs, pulse_odegen, _insert_op, _nonzero_coeffs_and_words, _one_parameter_generators, _one_parameter_paulirot_coeffs, _parshift_and_contract
label_desc: Use image node_id 4 for calling the TestPulseOdegenEdgeCases obj's underlying member method code with example usage: obj.test_batched_tape_raises() without return types