def METHOD_NAME(self, scope, name, *, session: "Optional[Session]" = None):
    """
    Get data identifier metadata.
    :param scope: The scope name
    :param name: The data identifier name
    :param session: The database session in use
    :returns: The metadata for the did
    """
    # get first document with this did == _id
    doc = self.col.find_one({
        "_id": "{}:{}".format(scope.internal, name)
    })
    # pop immutable keys
    for key in IMMUTABLE_KEYS:
        if key in doc:
            doc.pop(key)
    if not doc:
        raise exception.DataIdentifierNotFound(f"No metadata found for did '{scope}:{name}'")
    return doc