code: def _F_outdegree(H, F):
      
      if not isinstance(H, DirectedHypergraph):
          raise TypeError("Algorithm only applicable to directed hypergraphs")
  
      return F([len(H.get_forward_star(node))
               for node in H.get_node_set()])
docs: Returns the result of a function F applied to the set of outdegrees in
      in the hypergraph.
  
      :param H: the hypergraph whose outdegrees will be operated on.
      :param F: function to execute on the list of outdegrees in the hypergraph.
      :returns: result of the given function F.
      :raises: TypeError -- Algorithm only applicable to directed hypergraphs