in src/ext/guac.py [0:0]
def phase(option_value):
"""
Parses the given string, validating it against the set of valid Guacamole
protocol session phase identifier strings ("handshake" or "interactive").
:param option_value:
The string to parse, as may be received from Sphinx as the value of a
directive option.
:return string:
The provided, valid string.
:raises ValueError:
If the provided phase is invalid.
"""
return directives.choice(option_value, ('handshake', 'interactive'))