def get_blocks_from_s3_ref()

in src/annotation_consolidation_lambda.py [0:0]


def get_blocks_from_s3_ref(blocks_s3_ref: str, s3_client) -> list:
    """Return a list of blocks from an S3 reference file."""
    blocks = json.loads(s3_client.get_object_from_s3(blocks_s3_ref))
    for b in blocks:
        if 'parentBlockIndex' in b:
            del b['parentBlockIndex']
        if 'blockIndex' in b:
            del b['blockIndex']
    return blocks