def date_updated(node):
    """
    The most recent datetime when this node was modified, based on
    the logs.
    """
    try:
        return node.logs[-1].date
    except __HOLE__:
        return node.date_created
dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/migration/migrate_date_modified_for_existing_nodes.py/date_updated