<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_results_by_type(self, type):
 """ Get all the relation results for a type. :param type: The type :type type: str :rtype: Collection """

        instance = self._create_model_by_type(type)

        key = instance.get_key_name()

        query = instance.new_query()

        query = self._use_with_trashed(query)

        return query.where_in(key, self._gather_keys_by_type(type).all()).get()