code: def add_child(self, n, parent, **attrs):
          '''
          API: add_child(self, n, parent, **attrs)
          Description:
              Adds child n to node parent and return Node n.
          Pre:
              Node with name parent should exist.
          Input:
              n: Child node name.
              parent: Parent node name.
              attrs: Attributes of node being added.
          Post:
              Updates Graph related graph data attributes.
          Return:
              Returns n Node instance.
          '''
          attrs['level'] = self.get_node(parent).get_attr('level') + 1
          attrs['parent'] = parent
          self.add_node(n, **attrs)
          self.add_edge(parent, n)
          return self.get_node(nf add_child(self, n, parent, **attrs):
          '''
          API: add_child(self, n, parent, **attrs)
          Description:
              Adds child n to node parent and return Node n.
          Pre:
              Node with name parent should exist.
          Input:
              n: Child node name.
              parent: Parent node name.
              attrs: Attributes of node being added.
          Post:
              Updates Graph related graph data attributes.
          Return:
              Returns n Node instance.
          '''
          attrs['level'] = self.get_node(parent).get_attr('level') + 1
          attrs['parent'] = parent
          self.add_node(n, **attrs)
          self.add_edge(parent, n)
          return self.get_node(n)
docs: API: add_child(self, n, parent, **attrs)
          Description:
              Adds child n to node parent and return Node n.
          Pre:
              Node with name parent should exist.
          Input:
              n: Child node name.
              parent: Parent node name.
              attrs: Attributes of node being added.
          Post:
              Updates Graph related graph data attributes.
          Return:
              Returns n Node instance.