<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_compositekws(ckw_matches, spires=False):
 """Get composite keywords. :keyword spires: bool, to get the spires output :return: list of formatted keywords """

    output = {}
    for composite_keyword, info in ckw_matches:
        output[composite_keyword.output(spires)] = {"number": len(info[0]),
                                                    "details": info[1]}
    output = [{'keyword': key,
               'number': value['number'],
               'details': value['details']}
              for key, value in output.iteritems()]
    return sorted(output, key=lambda x: x['number'], reverse=True)