<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_entity_text_for_relation(self, node, relation):
 """Looks for an edge from node to some other node, such that the edge is annotated with the given relation. If there exists such an edge, and the node at the other edge is an entity, return that entity's text. Otherwise, returns None."""


        G = self.G
        related_node = self.get_related_node(node, relation)
        if related_node is not None:
            if not G.node[related_node]['is_event']:
                return G.node[related_node]['text']
            else:
                return None
        else:
            return None