def print_refs(lrefs, grefs):
    """
    overview of local and global refrences
    """
    sorted_keys = sorted(lrefs.keys())
    for board, ref in sorted_keys:
        lref = lrefs[(board, ref)]
        if lref in grefs:
            gboard = grefs[lref]
            stri = 'global, board {}'.format(gboard)
        else:
            stri = 'local'
        print('board {} ref {} - {} ({})'.
              format(board, ref, lrefs[(board, ref)], stri))