def try_get_column(column_name, node, context):
    """Attempt to get a column by name from the selectable.

    Args:
        column_name: str, name of the column to retrieve.
        node: SqlNode, the node the column is being retrieved for.
        context: CompilationContext, compilation specific metadata.

    Returns:
        Optional[column], the SQLAlchemy column if found, None otherwise.
    """
    selectable = get_node_selectable(node, context)
    if not hasattr(selectable, 'c'):
        raise AssertionError(
            u'Selectable "{}" does not have a column collection. Context is {}.'.format(
                selectable, context))
    return selectable.c.get(column_name, None)
Attempt to get a column by name from the selectable.

    Args:
        column_name: str, name of the column to retrieve.
        node: SqlNode, the node the column is being retrieved for.
        context: CompilationContext, compilation specific metadata.

    Returns:
        Optional[column], the SQLAlchemy column if found, None otherwise.