def get_prep_lookup(self, lookup_type, value):
        if hasattr(value, 'prepare'):
            return value.prepare()
        if hasattr(value, '_prepare'):
            return value._prepare()

        if lookup_type in (
                'regex', 'iregex', 'month', 'day', 'week_day', 'search',
                'contains', 'icontains', 'iexact', 'startswith', 'istartswith',
                'endswith', 'iendswith', 'isnull'
            ):
            return value
        elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte'):
            return self.get_prep_value(value)
        elif lookup_type in ('range', 'in'):
            return [self.get_prep_value(v) for v in value]
        elif lookup_type == 'year':
            try:
                return int(value)
            except ValueError:
                raise ValueError("The __year lookup type requires an integer argument")

        raise TypeError("Field has invalid lookup: %s" % lookup_type)
Produce connections in a depth-first-search starting at source.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/db/models/fields/__init__.py/Field.get_prep_lookup--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/depgraph.py/_dfs_connections