<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_eager_model_keys(self, models):
 """ Gather the keys from a list of related models. :type models: list :rtype: list """

        keys = []

        for model in models:
            value = getattr(model, self._foreign_key)

            if value is not None and value not in keys:
                keys.append(value)

        if not len(keys):
            return [0]

        return keys