<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_metadata(engine_name=None):
 """ get metadata according used for alembic It'll import all tables """

    dispatch.get(None, 'load_models')

    engine = engine_manager[engine_name]
    
    for tablename, m in engine.models.items():
        get_model(tablename, engine_name, signal=False)
        if hasattr(m, '__dynamic__') and getattr(m, '__dynamic__'):
            m.table.__mapping_only__ = True
    return engine.metadata