def METHOD_NAME(self, edge_attr: EdgeAttr) -> Optional[EdgeTensorType]:
    if edge_attr.layout.value == EdgeLayout.COO.value:
        # We always return a sorted COO edge index, if the request is
        # for an unsorted COO edge index, we change the is_sorted flag
        # to True and return the sorted COO edge index.
        if edge_attr.is_sorted == False:
            edge_attr.is_sorted = True
    key = self.key(edge_attr)
    if key in self.store:
        rel = self.store[self.key(edge_attr)]
        if not rel.materialized:
            if rel.layout != EdgeLayout.COO.value:
                raise ValueError("Only COO layout is supported")
        if rel.layout == EdgeLayout.COO.value:
            self.__get_edge_coo_from_database(self.key(edge_attr))
        return rel.edge_index
    else:
        return None