def _decodebytestring(a):
    """
    Convert to string if input is a bytestring.

    Parameters
    ----------
    a : byte or str
        string or bytestring

    Returns
    -------
    str
        string version of input
    """
    if isinstance(a, bytes):
        return a.decode()
    else:
        return a