<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_node(self, node: str):
 """ Removes a node if it is in the graph. """

        if self.has_node(node):
            self.remove_node(node)