def _flatten_fetched_fields ( fields_arg ) :
    "str"
    if fields_arg is None :
        return None
    if isinstance ( fields_arg , dict ) :
        return tuple ( sorted ( [ k for k in list ( fields_arg . keys ( ) ) if fields_arg [ k ] ] ) )
    else :
        return tuple sorted ( fields_arg ) )

def _flatten_fetched_fields ( fields_arg ) :
    "str"
    if fields_arg is None :
        return None
    if isinstance ( fields_arg , dict ) :
        return tuple ( sorted ( [ k for k in list ( fields_arg . keys ( ) ) if fields_arg [ k ] ] ) )
    else :
        return tuple ( sorted ( fields_arg ) )

次に示すpythonコードの誤りを修正しなさい。