import re


def object_id_from_uri(uri):
    """
    from a sciety.org uri extract the DOI portion to be an id value
    e.g. from https://sciety.org/articles/activity/10.1101/865006
    return 10.1101/865006
    """
    if uri:
        id_match_pattern = re.compile(r".*?/(10\..*)")
        matches = id_match_pattern.match(uri)
        if matches:
            return matches.group(1)
        return uri
    return uri