def METHOD_NAME(self, parent, child):
    """Derive entity properties by knowing it's parent folder."""
    if parent is not None and child is not None:
        # Folder hierarchy:
        child.add("parent", parent.id)
        child.add("ancestors", parent.get("ancestors"))
        child.add("ancestors", parent.id)
        self.apply_context(child, parent)