<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def table_convert_geometry(metadata, table_name):
 """Get table metadata from the database."""

    from sqlalchemy import Table
    from ..orm import Geometry

    table = Table(table_name, metadata, autoload=True)

    for c in table.columns:

        # HACK! Sqlalchemy sees spatialte GEOMETRY types
        # as NUMERIC

        if c.name == 'geometry':
            c.type = Geometry # What about variants?

    return table