def _fsdecode(x):
    """
    Decode a string to a L{unicode} representation, passing
    through existing L{unicode} unchanged.

    @param x: The string to be conditionally decoded.
    @type x: L{bytes} or L{unicode}

    @return: L{unicode}
    """
    if isinstance(x, bytes):
        return x.decode(sys.getfilesystemencoding())
    else:
        return x

    Decode a string to a L{unicode} representation, passing
    through existing L{unicode} unchanged.

    @param x: The string to be conditionally decoded.
    @type x: L{bytes} or L{unicode}

    @return: L{unicode}
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/_dumbwin32proc.py