def join_bytes_or_unicode(prefix, suffix):
<EOL>if type(prefix) == type(suffix):<EOL><INDENT>return join(prefix, suffix)<EOL><DEDENT>if isinstance(prefix, text_type):<EOL><INDENT>return join(prefix, suffix.decode(getfilesystemencoding()))<EOL><DEDENT>else:<EOL><INDENT>return join(prefix, suffix.encode(getfilesystemencoding()))<EOL><DEDENT>
Join two path components of either ``bytes`` or ``unicode``.

The return type is the same as the type of ``prefix``.