def METHOD_NAME(self, query_arg, meta, user, **kwargs):
    query = ignore_keys(query_arg, [settings.QUERY_API_KEY])
    parent_model = kwargs.get('parent_model')
    if parent_model and self.parent_resource():
        column_name, parent_class = next(
            (k, v) for k, v in self.parent_resource().items() if isinstance(
                parent_model, v.model_class))
        where = {}
        where[column_name] = parent_model.id
        filters = []
        for col, val in merge_dict(query, where).items():
            filters.append(self.model_class)
        return self.model_class.query.filter(
            **merge_dict(query, where)).all()
    else:
        return self.model_class.query.filter(**query).all()