def METHOD_NAME(request,data_by_deed, sql_context): 
    def reducer (accum, item): 
        a = accum if type(accum) is int else 1 
        return a + item ['value']
    lns = data_by_deed.aggregateByKey (0, reducer, lambda s1,d1: s1 + d1)
    schema = StructType([
        StructField("deed_url", StringType(), True),
        StructField("link_count", LongType(), True)
    ])
    return sql_context.createDataFrame (lns, schema=schema)