def METHOD_NAME(regs):
    regs = [METHOD_NAME(reg) for reg in regs] if isinstance(regs[0], (list, tuple)) else regs
    assert isinstance(regs[0], str)
    if len(regs) > 1:
        return ".*".join([f"({reg})" for reg in regs])
    elif len(regs) == 1:
        return regs[0]
    raise "Unallowed segment regs"