def _engine_builder(con):
    """
    Returns a SQLAlchemy engine from a URI (if con is a string)
    else it just return con without modifying it
    """
    global _SQLALCHEMY_INSTALLED
    if isinstance(con, string_types):
        try:
            import sqlalchemy
            con = sqlalchemy.create_engine(con)
            return con
        except __HOLE__:
            _SQLALCHEMY_INSTALLED = False

    return con
dataset/ETHPy150Open pydata/pandas/pandas/io/sql.py/_engine_builder