code: def local_useless_blockwise(fgraph, node):
      """
      If there is a dispatch implementation that does not require Blockwise, use that instead.
      This means a user created a Blockwise manually when there was no need.
  
      Note: This rewrite is not registered by default anywhere
      """
      op = node.op
      inputs = node.inputs
      dummy_core_node = op._create_dummy_core_node(node.inputs)
      vect_node = vectorize_node(dummy_core_node, *inputs)
      if not isinstance(vect_node.op, Blockwise):
          return copy_stack_trace(node.outputs, vect_node.outputs)
  
file_path: pytensor/pytensor/tensor/rewriting/blockwise.py
imports: from typing import Optional
  from pytensor.compile.mode import optdb
  from pytensor.graph import Constant, node_rewriter
  from pytensor.graph.replace import vectorize_node
  from pytensor.graph.rewriting.basic import copy_stack_trace, out2in
  from pytensor.tensor.basic import Alloc, ARange, alloc, shape_padleft
  from pytensor.tensor.blockwise import Blockwise
  from pytensor.tensor.math import Dot
  from pytensor.tensor.rewriting.basic import register_canonicalize, register_specialize, register_stabilize
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedSubtensor, Subtensor
label_desc: Use image node_id 1 for calling a global function with example usage: local_useless_blockwise(fgraph, node) and returns: copy_stack_trace