code: def parse_history_node(h_node):
          
          if isinstance(h_node, dict):
              return HistoryNode.from_dict(h_node)
  
          else:
              if len(h_node) != 3:
                  raise ValueError("Invalid History node, "
                                   "should be dict or (name, version, "
                                   "description) tuple: {}".format(h_node))
              return HistoryNode(h_node[0], h_node[1], h_node[2])
docs: Parses a History Node object from either a dict or a tuple.
  
          Args:
              h_node: A dict with name/url/description fields or a 3-element
                  tuple.
  
          Returns:
              History node.