<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_linguist_condition(self, condition, reverse=False, transform=False):
 """ Parses Q tree and returns linguist lookups or model lookups if reverse is True. """

        # We deal with a node
        if isinstance(condition, Q):
            children = []
            for child in condition.children:
                parsed = self._get_linguist_condition(
                    condition=child, reverse=reverse, transform=transform
                )
                if parsed is not None:
                    if (isinstance(parsed, Q) and parsed.children) or isinstance(
                        parsed, tuple
                    ):
                        children.append(parsed)

            new_condition = copy.deepcopy(condition)
            new_condition.children = children

            return new_condition

        # We are dealing with a lookup ('field', 'value').
        lookup, value = condition
        is_linguist = self.is_linguist_lookup(lookup)

        if transform and is_linguist:
            return Q(
                **utils.get_translation_lookup(
                    self.model._linguist.identifier, lookup, value
                )
            )

        if (reverse and not is_linguist) or (not reverse and is_linguist):
            return condition