def decode(symbol):
    """Decode from binary to string

    Parameters
    ----------
    symbol : binary
        A string in binary form, e.g. b'hola'.

    Returns
    -------
    str
        Symbol as a string.
    """
    try:
        return symbol.decode()
    except AttributeError:
        return symbol