<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_indexes(self):
 """Based on the resource definition calculates the index definition"""

        indexes = {}
        for resource in self._get_elastic_resources():
            try:
                index = self._resource_index(resource)

            except KeyError:  # ignore missing
                continue

            if index not in indexes:
                indexes.update({
                    index: {
                        'resource': self.elastic(resource),
                        'index_settings': {
                            'mappings': {}
                        }
                    }
                })

                settings = self._resource_config(resource, 'SETTINGS')
                if settings:
                    indexes[index]['index_settings'].update(settings)

            resource_config = self.app.config['DOMAIN'][resource]
            properties = self._get_mapping_properties(resource_config, parent=self._get_parent_type(resource))
            datasource = self.get_datasource(resource)
            indexes[index]['index_settings']['mappings'][datasource[0]] = properties

        return indexes