code: def mock_out_cache_hash(test_fn):
      def _make_next_hashed_path_for_test(*unused_args):
          return b"HASH"
  
      def _run_test(*args, **kwargs):
          with mock.patch.object(
              analysis_graph_builder._OptimizeVisitor,
              "_make_next_hashed_path",
              _make_next_hashed_path_for_test,
          ):
              return test_fn(*args, **kwargs)
  
      return _run_test
  
imports: import functools
  import os
  import struct
  from typing import Callable, Mapping, List
  import uuid
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  import tensorflow_transform
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import impl_helper
  from tensorflow_transform import nodes
  import tensorflow_transform.beam
  from tensorflow_transform.beam import analysis_graph_builder
  from tensorflow_transform.beam import analyzer_cache
  from tensorflow_transform.beam import tft_unit
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 5 for calling a global function with example usage: mock_out_cache_hash(test_fn) and returns: _run_test, bytes, test_fn