code: def checkpoint_non_float_input(pipe_class):
      class ForkNonFloat(nn.Module):
          def forward(self, input):
              return (input * 2, torch.tensor([False]))
  
      class JoinNonFloat(nn.Module):
          def forward(self, input):
              return input[0] * 2
  
      model = nn.Sequential(ForkNonFloat(), JoinNonFloat())
      model = pipe_class(
          model,
          balance=[1, 1],
          worker_map=get_worker_map(),
          chunks=1,
          checkpoint="always",
      )
  
      input = torch.rand(1, requires_grad=True)
      output = model(input)
      if model.group.rank() == 1:
          # with torch.autograd.detect_anomaly():
          output.backward()
  
      torch.distributed.barrier()
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import os
  import time
  import pytest
  import torch
  from torch import nn
  from fairscale.fair_dev.testing.testing import get_worker_map, torch_spawn
  from fairscale.internal import torch_version
  from fairscale.nn.model_parallel.initialize import get_pipeline_parallel_group
  from fairscale.nn.pipe import AsyncPipe
  from fairscale.nn.pipe.types import LazyModule
label_desc: Use image node_id 18 for calling a global function with example usage: checkpoint_non_float_input(pipe_class) and returns: unknown,  torch, unknown