@staticmethod
def _calculate_max_edges(machine_graph):
    """ Deduces the max incoming edges for any vertex

        :param machine_graph: the machine graph of the application
        :return:            the max number of incoming edges to any vertex in the application
        """
    max_in_edges = 0
    for vertex in machine_graph.vertices:
        n_incoming_edges = len(machine_graph.get_edges_ending_at_vertex(vertex)
            )
        if n_incoming_edges > max_in_edges:
            max_in_edges = n_incoming_edges
    return max_in_edges
