def get_prnt(node1, node2, parents):
    """Determine which of the nodes is child and which is parent.

    Args:
      node1 (str): first node of the edge
      node2 (str): second node of the edge
      parents (dict): dictionary mapping nodes to their parents

    Returns:
      str, str: id's of child and parent

    """
    if parents[node1] == node2:
        return (node1, node2)
    return (node2, node1)