def METHOD_NAME(self, entity_id: str) -> Optional[str]:
    """Apply a namespace signature to an entity ID, removing any
    previous namespace marker."""
    parsed_id, _ = self.parse(entity_id)
    if not len(self.bname):
        return parsed_id
    if parsed_id is None:
        return None
    digest = self.signature(parsed_id)
    if digest is None:
        return None
    return self.SEP.join((parsed_id, digest))