def sob(unicode, encoding):
 if (encoding is None):
  return unicode
 else:
  return unicode.encode(encoding)

def sob ( unicode , encoding ) : if ( encoding is None ) : return unicode else : return unicode . encode ( encoding )
returns either the given unicode string or its encoding .