How to type a dynamically assigned TorchScript module to be consumed by a TorchScript function/method?

Example:

@jit.script
class Foo:
    ...
@jit.script
class Quux:
    ...
@jit.script
class Bar:
    def __init__(self, cell):
        # cell may be either a Foo or a Quux creator
        self.cell1 = cell()
        self.cell2 = cell()
    def forward(self, x):
        self.sub(x, self.cell1)
        self.sub(x, self.cell2)
    def sub(self, x: Tensor, cell: ?????):
        ...