def __init__(self, parent, prop):
        # restate this path in terms of the
        # given MapperProperty's parent.
        insp = inspection.inspect(parent[-1])
        if not insp.is_aliased_class or insp._use_mapper_path:
            parent = parent.parent[prop.parent]
        elif insp.is_aliased_class and insp.with_polymorphic_mappers:
            if prop.parent is not insp.mapper and \
                    prop.parent in insp.with_polymorphic_mappers:
                subclass_entity = parent[-1]._entity_for_mapper(prop.parent)
                parent = parent.parent[subclass_entity]

        self.prop = prop
        self.parent = parent
        self.path = parent.path + (prop,)
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/path_registry.py/PropRegistry.__init__/original