code: def matrix_tape(tape, wire_order=None):
      n_wires = len(wire_order)
      unitary_matrix = np.eye(2**n_wires)
  
      for op in tape.operations:
          unitary_matrix = (
              matrix(op, wire_order=wire_order) @ unitary_matrix
          )
  
      return unitary_matrix
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.transforms.op_transforms import OperationTransformError
label_desc: Use image node_id 3 for calling a global function with example usage: matrix_tape(tape, wire_order) and returns: unitary_matrix