code: def set_node_attr(self, name, attr, value):
          '''
          API: set_node_attr(self, name, attr)
          Description:
          Sets attr attribute of node named name to value.
          Input:
              name: Name of node.
              attr: Attribute of node to set.
          Pre:
              Graph should have this node.
          Post:
              Node attribute will be updated.
          '''
          self.get_node(name).set_attr(attr, valuef set_node_attr(self, name, attr, value):
          '''
          API: set_node_attr(self, name, attr)
          Description:
          Sets attr attribute of node named name to value.
          Input:
              name: Name of node.
              attr: Attribute of node to set.
          Pre:
              Graph should have this node.
          Post:
              Node attribute will be updated.
          '''
          self.get_node(name).set_attr(attr, value)
docs: API: set_node_attr(self, name, attr)
          Description:
          Sets attr attribute of node named name to value.
          Input:
              name: Name of node.
              attr: Attribute of node to set.
          Pre:
              Graph should have this node.
          Post:
              Node attribute will be updated.