def _tostr(x):
    """
    Convert a value to the native string format.

    Parameters
    ----------
    x : str or bytes
        value to convert to a native string.

    Returns
    -------
    str
    """
    if isinstance(x, bytes):
        return x.decode()
    else:
        return str(x)