@staticmethod
def _available(colour, vertex, machine_graph, colour_mapping):
    """ Checks its neighbours to see if its colour is available

        :param colour: the colour to verify against
        :param vertex: the vertex in question
        :param machine_graph:            the machine graph representation of the application
        :param colour_mapping: the mapping between vertex and colour
        :return: bool saying yes or no
        """
    edges = machine_graph.get_edges_ending_at_vertex(vertex)
    for edge in edges:
        post_vertex = edge.pre_vertex
        if post_vertex in colour_mapping.keys():
            if colour_mapping[post_vertex] == colour:
                return False
    return True
