def pairname(insym, outsym):
    """Convert a pair of symbols into a single label

    insym -- input symbol as a string
    outsym -- output symbol as a string

    Returns a string notation of the pair, eg.

    >>> pairname ('a', 'a')
    a
    >>> pairname('i','j')
    i:j
    
    """
    if insym == outsym:
        return insym
    else:
        return insym + ':' + outsym
