code: def cleanup_recompute_tags(joint_module):
      """
      If there are two consecutive checkpointed blocks with no operator in
      between, we would still want to stash the tensor at the boundary of
      checkpointed blocks. The following pass makes the last output node
      non-recomputable to allow for that.
      """
      for node in joint_module.graph.nodes:
          if must_recompute(node):
              for user in node.users:
                  if (
                      must_recompute(user)
                      and user.meta["recompute"]
                      > node.meta["recompute"]
                  ):
                      node.meta["recompute"] = 0
      return joint_module
  
imports: from torch.fx.experimental.proxy_tensor import is_sym_node, py_sym_types
  from torch.fx.experimental.sym_node import magic_methods, method_to_operator
  from torch.fx.experimental.symbolic_shapes import hint_int, free_symbols, is_symbol_binding_fx_node, find_symbol_binding_fx_nodes
  import torch
  import torch.fx
  import operator
  import math
  import torch.utils._pytree
  import copy
  import os
  import itertools
  import sympy
  from collections import defaultdict
  from torch.fx.passes import graph_drawer
  from typing import List, Optional, Set, Tuple, Union
  from .compile_utils import fx_graph_cse, get_aten_target
  from .None import config
  import functools
label_desc: Use image node_id 22 for calling a global function with example usage: cleanup_recompute_tags(joint_module) and returns: joint_module