code: def _sub_func(expr, sub_dict):
      """Perform direct matching substitution, ignoring derivatives."""
      if expr in sub_dict:
          return sub_dict[expr]
      elif not expr.args or expr.is_Derivative:
          return expr
  
imports: from sympy.utilities import dict_merge
  from sympy.utilities.iterables import iterable
  from sympy.physics.vector import Dyadic, Vector, ReferenceFrame, Point, dynamicsymbols
  from sympy.physics.vector.printing import vprint, vsprint, vpprint, vlatex, init_vprinting
  from sympy.physics.mechanics.particle import Particle
  from sympy.physics.mechanics.rigidbody import RigidBody
  from sympy.simplify.simplify import simplify
  from sympy import Matrix, Mul, Derivative, sin, cos, tan, S
  from sympy.core.function import AppliedUndef
  from sympy.physics.mechanics.inertia import inertia, inertia_of_point_mass
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 14 for calling a global function with example usage: _sub_func(expr, sub_dict) and returns: sub_dict, expr