<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def groups_with_resources(cls, instance):
 """ Returns a list of groups users belongs to with eager loaded resources owned by those groups :param instance: :return: """

        return instance.groups_dynamic.options(
            sa.orm.eagerload(cls.models_proxy.Group.resources)
        )