def create_chunk_matches_to_score():
    doc = jina_pb2.Document()
    doc.id = 100
    doc.granularity = 0
    num_matches = 2
    for parent_id in range(1, 3):
        chunk = doc.chunks.add()
        chunk.id = (parent_id * 10)
        chunk.granularity = (doc.granularity + 1)
        for score_value in range((parent_id * 2), ((parent_id * 2) + num_matches)):
            match = chunk.matches.add()
            match.granularity = chunk.granularity
            match.parent_id = parent_id
            match.score.value = score_value
            match.score.ref_id = chunk.id
            match.id = ((10 * parent_id) + score_value)
            match.length = 4
    return doc
def create_chunk_matches_to_score():
    doc = jina_pb2.Document()
    doc.id = 100
    doc.granularity = 0
    num_matches = 2
    for parent_id in range(1, 3):
        chunk = doc.chunks.add()
        chunk.id = (parent_id * 10)
        chunk.granularity = (doc.granularity + 1)
        for score_value in range((parent_id * 2), ((parent_id * 2) + num_matches)):
            match = chunk.matches.add()
            match.granularity = chunk.granularity
            match.parent_id = parent_id
            match.score.value = score_value
            match.score.ref_id = chunk.id
            match.id = ((10 * parent_id) + score_value)
            match.length = 4
    return doc