def METHOD_NAME(self):
    class Model(torch.nn.Module):
        def __init__(self, output_layer):
            super(Model, self).__init__()
            self._output_layer = output_layer
        def forward(self, proposal_deltas, proposal_boxes):
            instances = Instances((10, 10))
            instances.proposal_boxes = Boxes(proposal_boxes)
            return self._output_layer.predict_boxes((None, proposal_deltas), [instances])
    box_head_output_size = 8
    box_predictor = FastRCNNOutputLayers(
        ShapeSpec(channels=box_head_output_size),
        box2box_transform=Box2BoxTransform(weights=(10, 10, 5, 5)),
        num_classes=5,
    )
    model = Model(box_predictor)
    from detectron2.export.torchscript_patch import patch_builtin_len
    with torch.no_grad(), patch_builtin_len():
        func = torch.jit.trace(model, (torch.randn(10, 20), torch.randn(10, 4)))
        o = func(torch.randn(10, 20), torch.randn(10, 4))
        self.assertEqual(o[0].shape, (10, 20))
        o = func(torch.randn(5, 20), torch.randn(5, 4))
        self.assertEqual(o[0].shape, (5, 20))
        o = func(torch.randn(20, 20), torch.randn(20, 4))
        self.assertEqual(o[0].shape, (20, 20))