def compose_hangul_syllable(jamo):
fmt_str_invalid_sequence = "<STR_LIT>"<EOL>if len(jamo) == <NUM_LIT:3>:<EOL><INDENT>l_part, v_part, t_part = jamo<EOL>if not (l_part in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>) and<EOL>v_part in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>) and<EOL>t_part in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>)):<EOL><INDENT>raise ValueError(fmt_str_invalid_sequence.format(jamo))<EOL><DEDENT>l_index = l_part - L_BASE<EOL>v_index = v_part - V_BASE<EOL>t_index = t_part - T_BASE<EOL>lv_index = l_index * N_COUNT + v_index * T_COUNT<EOL>return S_BASE + lv_index + t_index<EOL><DEDENT>elif len(jamo) == <NUM_LIT:2>:<EOL><INDENT>if jamo[<NUM_LIT:0>] in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>) and jamo[<NUM_LIT:1>] in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>):<EOL><INDENT>l_part, v_part = jamo<EOL>l_index = l_part - L_BASE<EOL>v_index = v_part - V_BASE<EOL>lv_index = l_index * N_COUNT + v_index * T_COUNT<EOL>return S_BASE + lv_index<EOL><DEDENT>elif _get_hangul_syllable_type(jamo[<NUM_LIT:0>]) == "<STR_LIT>" and jamo[<NUM_LIT:1>] in range(<NUM_LIT>, <NUM_LIT> + <NUM_LIT:1>):<EOL><INDENT>lv_part, t_part = jamo<EOL>t_index = t_part - T_BASE<EOL>return lv_part + t_index<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(fmt_str_invalid_sequence.format(jamo))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError(fmt_str_invalid_sequence.format(jamo))<EOL><DEDENT>
Function for taking a tuple or list of Unicode scalar values representing Jamo and composing it into a Hangul
syllable.  If the values in the list or tuple passed in are not in the ranges of Jamo, a ValueError will be raised.

The algorithm for doing the composition is described in the Unicode Standard, ch. 03, section 3.12, "Conjoining Jamo
Behavior."

Example: (U+1111, U+1171) -> U+D4CC
         (U+D4CC, U+11B6) -> U+D4DB
         (U+1111, U+1171, U+11B6) -> U+D4DB

:param jamo: Tuple of list of Jamo to compose
:return: Composed Hangul syllable