def tokey(o):
    """ Convert an object to a string.

    Examples
    --------

    >>> tokey(b'x')
    b'x'
    >>> tokey('x')
    'x'
    >>> tokey(1)
    '1'
    """
    typ = type(o)
    if typ is str or typ is bytes:
        return o
    else:
        return str(o)
