def get_direction(direction_id):
    """Return boolean direction id"""
    if direction_id == 'inbound':
        return 0
    elif direction_id == 'outbound':
        return 1
    else:
        raise ValueError('Cannot determine direction from %s' % direction_id)
