def _dir_option(argument):
    argument = argument.lower().strip()
    if argument == 'right': return 'LR'
    if argument == 'left': return 'RL'
    if argument == 'down': return 'TB'
    if argument == 'up': return 'BT'
    raise ValueError('%r unknown; choose from left, right, up, down' %
                     argument)
A directive option spec for the orientation of a graph.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/epydoc/markup/restructuredtext.py/_dir_option