<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tenant_provisioned(tenant_id):
 """Returns true if any networks or ports exist for a tenant."""

    session = db.get_reader_session()
    with session.begin():
        res = any(
            session.query(m).filter(m.tenant_id == tenant_id).count()
            for m in [models_v2.Network, models_v2.Port]
        )
    return res