<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_installed_apps():
 """ Return list of all installed apps """

    if django.VERSION >= (1, 7):
        from django.apps import apps
        return [a.models_module for a in apps.get_app_configs()
                if a.models_module is not None]
    else:
        from django.db import models
        return models.get_apps()