parameters: (parent, new_child, tag, param_name=None)
docstring: Given a node, replaces the child with tag `tag` with new_child
  
      Args:
          parent    (lxml.etree._Element) : Node whose child needs to be replaced
          new_child (lxml.etree._Element) : Updated child of the parent
          tag       (str)                 : To identify the appropriate child
  
      Returns:
          (None)
docstring_summary: Given a node, replaces the child with tag `tag` with new_child
docstring_tokens: Given a node replaces the child with tag tag with new_child
function: def update_child_at_parent(parent, new_child, tag, param_name=None):
      """
      Given a node, replaces the child with tag `tag` with new_child
  
      Args:
          parent    (lxml.etree._Element) : Node whose child needs to be replaced
          new_child (lxml.etree._Element) : Updated child of the parent
          tag       (str)                 : To identify the appropriate child
  
      Returns:
          (None)
      """
      if not param_name:
          for chld in parent:
              if chld.tag == tag:
                  chld.getparent().remove(chld)
      else:
          for chld in parent:
              if chld.tag == tag and chld.attrib["name"] == param_name:
                  chld.getparent().remove(chld)
      parent.insert(0, new_child)
function_tokens: def update_child_at_parent ( parent , new_child , tag , param_name = None ) : if not param_name : for chld in parent : if chld . tag == tag : chld . getparent ( ) . remove ( chld ) else : for chld in parent : if chld . tag == tag and chld . attrib [ "name" ] == param_name : chld . getparent ( ) . remove ( chld ) parent . insert ( 0 , new_child )