def METHOD_NAME(self, ver_and_role: str):
    repo = self.server.repo
    ver_str, sep, role = ver_and_role.rpartition(".")
    if sep == "":
        # 0 will lead to list lookup with -1, meaning latest version
        ver = 0
    else:
        ver = int(ver_str)
    if role not in repo.role_cache or ver > len(repo.role_cache[role]):
        return None
    # return metadata
    return repo.role_cache[role][ver - 1].to_bytes(JSONSerializer())