'Helper method for build_lookup(). Try to fetch and initialize
a transform for name parameter from lhs.'

def try_transform(self, lhs, name):

    transform_class = lhs.get_transform(name)
    if transform_class:
        return transform_class(lhs)
    else:
        raise FieldError(("Unsupported    lookup    '%s'    for    %s    or    join    on    the    field    not    permitted." % (name, lhs.output_field.__class__.__name__)))
