def get_registered_from(registration):
    if registration.registered_from:
        return registration.registered_from_id
    else:
        first_log_id = db['node'].find_one({'_id': registration._id})['logs'][0]
        log = NodeLog.load(first_log_id)
        return log.params.get('node') or log.params.get('project')
Get info about what metrics are registered and with what stats.
dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/migrate_registration_logs.py/get_registered_from--crossover with--dataset/ETHPy150Open openstack/python-opentsdbclient/opentsdbclient/base.py/BaseOpenTSDBClient.get_statistics