'Internal helper to get the Property for a protobuf-level property.'

def _get_property_for(self, p, indexed=True, depth=0):

    parts = p.name().split('.')
    if (len(parts) <= depth):
        return None
    next = parts[depth]
    prop = self._properties.get(next)
    if (prop is None):
        prop = self._fake_property(p, next, indexed)
    return prop
