<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def phi4(gold_clustering, predicted_clustering):
 """ Subroutine for ceafe. Computes the mention F measure between gold and predicted mentions in a cluster. """

        return 2 * len([mention for mention in gold_clustering if mention in predicted_clustering]) \
               / float(len(gold_clustering) + len(predicted_clustering))