code: def test_useless_blockwise_of_elemwise():
      x = matrix("x")
      out = Blockwise(Elemwise(scalar_log), signature="()->()")(x)
      assert isinstance(out.owner.op, Blockwise)
      assert isinstance(out.owner.op.core_op, Elemwise)
  
      fg = FunctionGraph([x], [out], clone=False)
      [new_out] = local_useless_blockwise.transform(fg, out.owner)
      assert isinstance(new_out.owner.op, Elemwise)
  
file_path: pytensor/tests/tensor/rewriting/test_blockwise.py
imports: from functools import partial
  from pytensor import function
  from pytensor.graph import FunctionGraph, rewrite_graph
  from pytensor.graph.basic import equal_computations
  from pytensor.scalar import log
  from pytensor.tensor import add, alloc, matrix, tensor, tensor3
  from pytensor.tensor.blockwise import Blockwise
  from pytensor.tensor.elemwise import Elemwise
  from pytensor.tensor.nlinalg import MatrixPinv
  from pytensor.tensor.rewriting.blockwise import local_useless_blockwise
label_desc: Use image node_id 1 for calling a global function with example usage: test_useless_blockwise_of_elemwise() without return types