Conver a list to tuple

I have a tuple made like this:

mytuple = (0, 5) + tuple(1 for _ in range(len(some_tuple) - 2))

I tried to make a script of my class and I got:

torch.jit.frontend.UnsupportedNodeError: GeneratorExp aren't supported
mytuple = (0, 5) + tuple(1 for _ in range(len(some_tuple) - 2))
                        ~ <--- HERE

So I change the code to:

mytuple = [0, 5]
for _ in range(len(some_tuple) - 2):
    mytuple.append(1)
mytuple = tuple(mytuple)

but I gotthis error:

cannot statically infer the expected size of a list in this context:
mytuple = tuple(mytuple)
          ~~~~~~~~~~~~~ <--- HERE

I change the last line to:

mytuple = (mytuple,)

but in the end I figured out that is not a tuple of integers and it is type ‘Tuple[List[int]]’.

my last try was to unpack the list:

mytuple = tuple(*mytuple)

I faced this error:

Unexpected starred expansion. File a bug report:
mytuple = tuple(*mytuple)
                 ~~~~~~~ <--- HERE

How can I have tuple of integers with dynamic length that is scriptable?