<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split_and_sort(self):
 """ Split the graphs into sub graphs and return a list of all graphs sorted by the number of nodes. The graph with most nodes is returned first. """

        graphs = list(self.split())
        graphs.sort(key=lambda x: -len(x.metadata))
        for index, graph in enumerate(graphs):
            graph.index = index
        return graphs