def _fix_user_options(options):
 def to_str_or_none(x):
  if (x is None):
   return None
  return str(x)
 return [tuple((to_str_or_none(x) for x in y)) for y in options]

def _fix_user_options ( options ) : def to_str_or_none ( x ) : if ( x is None ) : return None return str ( x ) return [ tuple ( ( to_str_or_none ( x ) for x in y ) ) for y in options ]
this is for python 2 .